# OrtException.OrtErrorCode (onnxruntime 1.15.0 API)

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 the OrtErrorCode struct in "onnxruntime_c_api.h" with an additional entry for Java side errors.

### Enum Constant Summary

Enum Constants
`ORT_ENGINE_ERROR`
`ORT_EP_FAIL`
`ORT_FAIL`
`ORT_INVALID_ARGUMENT`
`ORT_INVALID_GRAPH`
`ORT_INVALID_PROTOBUF`
`ORT_JAVA_UNKNOWN`
`ORT_MODEL_LOADED`
`ORT_NO_MODEL`
`ORT_NO_SUCHFILE`
`ORT_NOT_IMPLEMENTED`
`ORT_OK`
`ORT_RUNTIME_EXCEPTION`

### Method Summary

All Methods Static Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Enum

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### ORT_JAVA_UNKNOWN

    public static final OrtException.OrtErrorCode ORT_JAVA_UNKNOWN

#### ORT_OK

    public static final OrtException.OrtErrorCode ORT_OK

#### ORT_FAIL

    public static final OrtException.OrtErrorCode ORT_FAIL

#### ORT_INVALID_ARGUMENT

    public static final OrtException.OrtErrorCode ORT_INVALID_ARGUMENT

#### ORT_NO_SUCHFILE

    public static final OrtException.OrtErrorCode ORT_NO_SUCHFILE

#### ORT_NO_MODEL

    public static final OrtException.OrtErrorCode ORT_NO_MODEL

#### ORT_ENGINE_ERROR

    public static final OrtException.OrtErrorCode ORT_ENGINE_ERROR

#### ORT_RUNTIME_EXCEPTION

    public static final OrtException.OrtErrorCode ORT_RUNTIME_EXCEPTION

#### ORT_INVALID_PROTOBUF

    public static final OrtException.OrtErrorCode ORT_INVALID_PROTOBUF

#### ORT_MODEL_LOADED

    public static final OrtException.OrtErrorCode ORT_MODEL_LOADED

#### ORT_NOT_IMPLEMENTED

    public static final OrtException.OrtErrorCode ORT_NOT_IMPLEMENTED

#### ORT_INVALID_GRAPH

    public static final OrtException.OrtErrorCode ORT_INVALID_GRAPH

#### ORT_EP_FAIL

    public static final OrtException.OrtErrorCode ORT_EP_FAIL

### 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 name
  `java.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.