OP_LOGE_FOR_INVALID_ARGUMENT_WITH_REASON

Description

Records and reports an invalid parameter error (with a cause). If the specified parameter of an operator is invalid, an error log is generated and the error code EZ0037 is reported.

Prototype

OP_LOGE_FOR_INVALID_ARGUMENT_WITH_REASON(entityName, paramName, 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.

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 (axesSize > xShape.GetDimNum()) {
    OP_LOGE_FOR_INVALID_ARGUMENT_WITH_REASON("MyOp", "axes", "axes size exceeds input dim num");
    return ge::GRAPH_FAILED;
}