OP_LOGE_FOR_INVALID_VALUES_WITH_REASON
Description
Records and reports multiple parameter value errors (with causes). If multiple operator parameters have incorrect values, an error log (including the specific causes) is generated and the error code EZ0027 is reported.
Prototype
OP_LOGE_FOR_INVALID_VALUES_WITH_REASON(entityName, paramNames, incorrectValues, reason)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
entityName |
Input |
Operator name or aclnn API name. The type can be const char* or std::string. |
paramNames |
Input |
Parameter name list. The type can be const char* or std::string. |
incorrectValues |
Input |
Actual parameter value list. The const char* or std::string type is supported. |
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: Parameters align_corners and half_pixel_centers of ResizeNearestNeighborV2Grad have // incorrect values true and true. Reason: The values of attributes align_corners and // half_pixel_centers cannot be true at the same time. if (alignCorners_ && halfPixelCenters_) { OP_LOGE_FOR_INVALID_VALUES_WITH_REASON("ResizeNearestNeighborV2Grad", "align_corners and half_pixel_centers", "true and true", "The values of attributes align_corners and half_pixel_centers cannot be true at the same time."); return ge::GRAPH_FAILED; } |
Parent topic: log