OP_LOGE_FOR_INVALID_VALUE_WITH_REASON
Description
Records and reports a parameter value error (with a cause). If an operator parameter has an incorrect value, an error log (including the specific cause) is generated and the error code EZ0026 is reported.
Prototype
OP_LOGE_FOR_INVALID_VALUE_WITH_REASON(entityName, paramName, incorrectValue, 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. |
incorrectValue |
Input |
Actual parameter value. The type can be const char* or std::string. |
reason |
Input |
Error cause description. 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 5 6 7 8 9 | // Expected output: Parameter output_size of UpsampleNearest3D has incorrect value // (2147483648, 512, 512). Reason: Each value of output_size must be less than or equal to // INT32_MAX. if (outputSizeVal > INT32_MAX) { OP_LOGE_FOR_INVALID_VALUE_WITH_REASON("UpsampleNearest3D", "output_size", outputSizeStr.c_str(), "Each value of output_size must be less than or equal to INT32_MAX."); return ge::GRAPH_FAILED; } |
Parent topic: log