OP_LOGE_FOR_FILE_PARSE

Description

Records and reports a file parsing failure error. If a file fails to be parsed, an error log is generated and the error code EZ0031 is reported.

Prototype

OP_LOGE_FOR_FILE_PARSE(opName, fileName, reason)

Parameters

Parameter

Input/Output

Description

opName

Input

Operator name or aclnn API name. The type can be const char* or std::string.

fileName

Input

File name. The type can be const char* or std::string.

reason

Input

Parsing failure 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 (!ParseJsonFile(fileName, config)) {
    OP_LOGE_FOR_FILE_PARSE("MyOp", fileName, "invalid json format");
    return ge::GRAPH_FAILED;
}