OP_LOGE_FOR_INVALID_CONFIG_WITH_REASON
Description
Records and reports an invalid configuration item value error (with a cause). If the value of a configuration item in the configuration file is invalid, an error log is generated and the error code EZ0033 is reported.
Prototype
OP_LOGE_FOR_INVALID_CONFIG_WITH_REASON(opName, configFile, item, value, reason)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
opName |
Input |
Operator name or aclnn API name. The type can be const char* or std::string. |
configFile |
Input |
Configuration file path. The type can be const char* or std::string. |
item |
Input |
Configuration item name. The type can be const char* or std::string. |
value |
Input |
Actual value. 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 (!IsValidConfig(value)) { OP_LOGE_FOR_INVALID_CONFIG_WITH_REASON("MyOp", "config.ini", "block_size", value.c_str(), "out of range"); return ge::GRAPH_FAILED; } |
Parent topic: log