函数:peek_at_last_error
产品支持情况
产品 |
是否支持 |
---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
功能说明
获取当前线程的Runtime(运行时管理模块)错误码,仅获取但不清空错误码。
函数原型
- C函数原型
1
aclErroraclrtPeekAtLastError(aclrtLastErrLevel level)
- python函数
1
ret = acl.rt.peek_at_last_error(level)
参数说明
参数名 |
说明 |
---|---|
level |
int,指定获取错误码的级别,当前仅支持线程级别。参考aclrtLastErrLevel |
返回值说明
返回值 |
说明 |
---|---|
ret |
int,返回0表示成功,返回非0表示失败。 |
父主题: 异常处理