OP_LOGE_FOR_INVALID_LISTSIZE_WITH_REASON
Description
Records and reports a parameter list size error (with a cause). If the size of the specified parameter list of an operator is invalid, an error log is generated and the error code EZ0038 is reported.
Prototype
OP_LOGE_FOR_INVALID_LISTSIZE_WITH_REASON(entityName, paramName, incorrectSize, reason)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
entityName |
Input |
Operator name or aclnn API name. The type can be const char* or std::string. |
paramName |
Input |
Parameter name. The type can be const char* or std::string. |
incorrectSize |
Input |
Actual list size. The type can be const char* or std::string. |
reason |
Input |
Error cause. The type can be const char* or std::string. |
Return Value
None.
Constraints
None.
Example
The following sample code is for reference only. Do not copy and run it.
1 2 3 4 | if (listSize > maxListSize) { OP_LOGE_FOR_INVALID_LISTSIZE_WITH_REASON("MyOp", "dims", std::to_string(listSize).c_str(), "exceeds max limit"); return ge::GRAPH_FAILED; } |
Parent topic: log