---
title: 函数：get_stream_id_from_exception_info
description: "| C函数原型 | uint32\_t aclrtGetStreamIdFromExceptionInfo(const aclrtExceptionInfo \*info) |"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgp/aclpythondevg_01_0104.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgp/aclpythondevg_01_0104.html
indexId: 252ac2ce2c292733533383d2fba41a374b2065789bcda771c7770da700915242108
---
# 函数：get_stream_id_from_exception_info

| C函数原型 | uint32\_t aclrtGetStreamIdFromExceptionInfo(const aclrtExceptionInfo \*info) |
| --- | --- |
| Python函数 | stream\_id = acl.rt.get\_stream\_id\_from\_exception\_info(info) |
| 函数功能 | 获取异常信息中的Stream ID，同步接口。该接口与acl.rt.set\_exception\_info\_callback接口配合使用。 |
| 输入说明 | info：int，表示异常信息aclrtExceptionInfo的指针地址。 在执行任务之前调用acl.rt.set\_exception\_info\_callback接口，系统会将产生异常的任务ID、Stream ID、线程ID、Device ID存放在aclExceptionInfo中。 |
| 返回值说明 | stream\_id：int，返回异常信息中的Stream ID，返回值为“0xFFFFFFFF”（以十六进制为例）时表示异常信息为空。 |
| 约束说明 | 无 |
| 参考资源 | 接口调用示例，参见AI Core异常信息获取。 |
