fromValue static method
- int value
Creates an enumeration value from int. param value The int value. return The created LicenseError.
Implementation
static LicenseError fromValue(int value) {
switch (value) {
case 0:
return LicenseError.success;
case -1:
return LicenseError.insufficientBuffer;
case -2:
return LicenseError.objectDoesNotExist;
case -100:
return LicenseError.base;
case -999:
return LicenseError.minimum;
case -101:
return LicenseError.invalidHandle;
case -102:
return LicenseError.invalidParameter;
case -103:
return LicenseError.licenseNotFound;
case -104:
return LicenseError.invalidLicense;
case -105:
return LicenseError.expiredLicense;
case -106:
return LicenseError.invalidHardwareId;
case -107:
return LicenseError.alreadyFulfilled;
case -108:
return LicenseError.moduleError;
case -109:
return LicenseError.writeError;
case -110:
return LicenseError.insufficientLicenseCredits;
case -111:
return LicenseError.invalidSerial;
case -112:
return LicenseError.invalidCredentials;
case -113:
return LicenseError.revokedLicense;
case -114:
return LicenseError.blockedLicense;
case -115:
return LicenseError.unreachableServer;
case -116:
return LicenseError.licenseOtherError;
case -117:
return LicenseError.missingFile;
case -118:
return LicenseError.deviceNotCompatible;
default:
throw Exception("Unable to find the specified enum value for $value");
}
}