OP_LOGE_WITH_INVALID_INPUT
Note: This API has been deprecated. Use OP_LOGE_FOR_INVALID_VALUE or OP_CHECK_NULL_WITH_CONTEXT instead.
Description
Records and reports a null input parameter error. If the required parameter of an operator is null, an error log is generated and the error code EZ0004 is reported.
Prototype
OP_LOGE_WITH_INVALID_INPUT(entityName, paramName)
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. |
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 | // Expected output: Parameter input of MyOp is required, but it is empty. if (xDesc == nullptr) { OP_LOGE_WITH_INVALID_INPUT("MyOp", "input"); return false; } |
Parent topic: log