Package ai.onnxruntime
Enum Class OrtException.OrtErrorCode
- All Implemented Interfaces:
Serializable,Comparable<OrtException.OrtErrorCode>,Constable
- Enclosing class:
- OrtException
Maps the
OrtErrorCode struct in onnxruntime_c_api.h with an additional entry
for Java side errors.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThere is an internal error in the ORT engine.The ORT execution provider failed.The operation failed.The operation received an invalid argument.The ONNX graph is invalid.The provided protobuf was invalid.An unknown error occurred in the Java API.The model was loaded.The operation could not use the model.The operation could not load the required file.The requested operation has not been implemented.The operation completed without error.The operation threw a runtime exception. -
Method Summary
Modifier and TypeMethodDescriptionstatic OrtException.OrtErrorCodemapFromInt(int value) Maps from an int in native land into an OrtErrorCode instance.static OrtException.OrtErrorCodeReturns the enum constant of this class with the specified name.static OrtException.OrtErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ORT_JAVA_UNKNOWN
An unknown error occurred in the Java API. -
ORT_OK
The operation completed without error. -
ORT_FAIL
The operation failed. -
ORT_INVALID_ARGUMENT
The operation received an invalid argument. -
ORT_NO_SUCHFILE
The operation could not load the required file. -
ORT_NO_MODEL
The operation could not use the model. -
ORT_ENGINE_ERROR
There is an internal error in the ORT engine. -
ORT_RUNTIME_EXCEPTION
The operation threw a runtime exception. -
ORT_INVALID_PROTOBUF
The provided protobuf was invalid. -
ORT_MODEL_LOADED
The model was loaded. -
ORT_NOT_IMPLEMENTED
The requested operation has not been implemented. -
ORT_INVALID_GRAPH
The ONNX graph is invalid. -
ORT_EP_FAIL
The ORT execution provider failed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
mapFromInt
Maps from an int in native land into an OrtErrorCode instance.- Parameters:
value- The value to lookup.- Returns:
- The enum instance.
-