# fromValue static method

FaceError fromValue(

1. int value

)

Creates an enumeration value from int. param value The int value. return The created FaceError.

## Implementation

    static FaceError fromValue(int value) {
        	switch (value) {
          	case 0:
            	return FaceError.success;
          	case -1:
            	return FaceError.insufficientBuffer;
          	case -2:
            	return FaceError.objectDoesNotExist;
          	case -1000:
            	return FaceError.base;
          	case -1999:
            	return FaceError.minimum;
          	case -1001:
            	return FaceError.invalidHandle;
          	case -1002:
            	return FaceError.invalidParameter;
          	case -1004:
            	return FaceError.invalidPixelFormat;
          	case -1005:
            	return FaceError.invalidTemplateFormat;
          	case -1006:
            	return FaceError.invalidLandmarks;
          	case -1007:
            	return FaceError.iodTooSmall;
          	case -1008:
            	return FaceError.invalidModelPath;
          	case -1010:
            	return FaceError.invalidImageSize;
          	case -1020:
            	return FaceError.unloadedModel;
          	case -1040:
            	return FaceError.inferenceBackendError;
          	case -1041:
            	return FaceError.processingUnitUnavailable;
          	case -1050:
            	return FaceError.indexerAlreadyInitialized;
          	case -1051:
            	return FaceError.indexerIdAlreadyExists;
          	case -1052:
            	return FaceError.indexerInvalidTemplateData;
          	case -1053:
            	return FaceError.indexerFull;
          	case -1054:
            	return FaceError.indexerIdNotFound;
          	case -1055:
            	return FaceError.indexerInvalidIndexFile;
          	case -1056:
            	return FaceError.functionNotImplemented;
        default:
            	throw Exception("Unable to find the specified enum value for $value");
        	}
      	}