OP_LOGE_FOR_FILE_PATH

Description

Records and reports an invalid file path error. If an input file path is invalid, an error log is generated and the error code EZ0029 is reported.

Prototype

OP_LOGE_FOR_FILE_PATH(opName, filePath, reason)

Parameters

Parameter

Input/Output

Description

opName

Input

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

filePath

Input

File path. 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 (access(filePath, F_OK) != 0) {
    OP_LOGE_FOR_FILE_PATH("MyOp", filePath, "file does not exist");
    return ge::GRAPH_FAILED;
}