OP_LOGE_FOR_INVALID_FORMAT_WITH_REASON
Description
Records and reports a parameter format error (with a cause). If the specified parameter format of an operator is invalid, an error log is generated and the error code EZ0035 is reported.
Prototype
OP_LOGE_FOR_INVALID_FORMAT_WITH_REASON(entityName, paramName, incorrectFormat, 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. |
incorrectFormat |
Input |
Actual format (for example, NHWC). 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 (!IsSupportedFormat(format)) { OP_LOGE_FOR_INVALID_FORMAT_WITH_REASON("MyOp", "x", "NDHWC", "only support NCHW and NHWC"); return ge::GRAPH_FAILED; } |
Parent topic: log