Package ai.onnxruntime
Enum OrtException.OrtErrorCode
- java.lang.Object
-
- java.lang.Enum<OrtException.OrtErrorCode>
-
- ai.onnxruntime.OrtException.OrtErrorCode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<OrtException.OrtErrorCode>
- Enclosing class:
- OrtException
public static enum OrtException.OrtErrorCode extends java.lang.Enum<OrtException.OrtErrorCode>
Maps theOrtErrorCode
struct inonnxruntime_c_api.h
with an additional entry for Java side errors.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ORT_ENGINE_ERROR
There is an internal error in the ORT engine.ORT_EP_FAIL
The ORT execution provider failed.ORT_FAIL
The operation failed.ORT_INVALID_ARGUMENT
The operation received an invalid argument.ORT_INVALID_GRAPH
The ONNX graph is invalid.ORT_INVALID_PROTOBUF
The provided protobuf was invalid.ORT_JAVA_UNKNOWN
An unknown error occurred in the Java API.ORT_MODEL_LOADED
The model was loaded.ORT_NO_MODEL
The operation could not use the model.ORT_NO_SUCHFILE
The operation could not load the required file.ORT_NOT_IMPLEMENTED
The requested operation has not been implemented.ORT_OK
The operation completed without error.ORT_RUNTIME_EXCEPTION
The operation threw a runtime exception.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OrtException.OrtErrorCode
mapFromInt(int value)
Maps from an int in native land into an OrtErrorCode instance.static OrtException.OrtErrorCode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static OrtException.OrtErrorCode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ORT_JAVA_UNKNOWN
public static final OrtException.OrtErrorCode ORT_JAVA_UNKNOWN
An unknown error occurred in the Java API.
-
ORT_OK
public static final OrtException.OrtErrorCode ORT_OK
The operation completed without error.
-
ORT_FAIL
public static final OrtException.OrtErrorCode ORT_FAIL
The operation failed.
-
ORT_INVALID_ARGUMENT
public static final OrtException.OrtErrorCode ORT_INVALID_ARGUMENT
The operation received an invalid argument.
-
ORT_NO_SUCHFILE
public static final OrtException.OrtErrorCode ORT_NO_SUCHFILE
The operation could not load the required file.
-
ORT_NO_MODEL
public static final OrtException.OrtErrorCode ORT_NO_MODEL
The operation could not use the model.
-
ORT_ENGINE_ERROR
public static final OrtException.OrtErrorCode ORT_ENGINE_ERROR
There is an internal error in the ORT engine.
-
ORT_RUNTIME_EXCEPTION
public static final OrtException.OrtErrorCode ORT_RUNTIME_EXCEPTION
The operation threw a runtime exception.
-
ORT_INVALID_PROTOBUF
public static final OrtException.OrtErrorCode ORT_INVALID_PROTOBUF
The provided protobuf was invalid.
-
ORT_MODEL_LOADED
public static final OrtException.OrtErrorCode ORT_MODEL_LOADED
The model was loaded.
-
ORT_NOT_IMPLEMENTED
public static final OrtException.OrtErrorCode ORT_NOT_IMPLEMENTED
The requested operation has not been implemented.
-
ORT_INVALID_GRAPH
public static final OrtException.OrtErrorCode ORT_INVALID_GRAPH
The ONNX graph is invalid.
-
ORT_EP_FAIL
public static final OrtException.OrtErrorCode ORT_EP_FAIL
The ORT execution provider failed.
-
-
Method Detail
-
values
public static OrtException.OrtErrorCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (OrtException.OrtErrorCode c : OrtException.OrtErrorCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OrtException.OrtErrorCode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
mapFromInt
public static OrtException.OrtErrorCode mapFromInt(int value)
Maps from an int in native land into an OrtErrorCode instance.- Parameters:
value
- The value to lookup.- Returns:
- The enum instance.
-
-