tensorflow/java/src/main/native/exception_jni.cc
// Map TF_Codes to unchecked exceptions.
Map TF_Codes to unchecked exceptions.
Map TF_Codes to unchecked exceptions .
const char* exceptionClassName(TF_Code code) {
  switch (code) {
    case TF_OK:
      return nullptr;
    case TF_INVALID_ARGUMENT:
      return kIllegalArgumentException;
    case TF_UNAUTHENTICATED:
    case TF_PERMISSION_DENIED:
      return "java/lang/SecurityException";
    case TF_RESOURCE_EXHAUSTED:
    case TF_FAILED_PRECONDITION:
      return kIllegalStateException;
    case TF_OUT_OF_RANGE:
      return kIndexOutOfBoundsException;
    case TF_UNIMPLEMENTED:
      return kUnsupportedOperationException;
    default:
      return "org/tensorflow/TensorFlowException";
  }
}
const char * exceptionClassName ( TF_Code code ) { switch ( code ) { case TF_OK : return nullptr ; case TF_INVALID_ARGUMENT : return kIllegalArgumentException ; case TF_UNAUTHENTICATED : case TF_PERMISSION_DENIED : return " " ; case TF_RESOURCE_EXHAUSTED : case TF_FAILED_PRECONDITION : return kIllegalStateException ; case TF_OUT_OF_RANGE : return kIndexOutOfBoundsException ; case TF_UNIMPLEMENTED : return kUnsupportedOperationException ; default : return " " ; } }
Map TF_Codes to unchecked exceptions.
Map TF_Codes to unchecked exceptions .