 |
LicenseSpring C++ SDK
7.31.0
Easily add Software Licensing to your application
|
Go to the documentation of this file. 1 #ifndef LS_EXCEPTIONS_H
2 #define LS_EXCEPTIONS_H
6 #pragma warning( push )
7 #pragma warning( disable : 4275 )
22 : std::runtime_error( message.c_str() )
23 , m_errorCode( errorCode )
408 #pragma warning( pop )
411 #endif // LS_EXCEPTIONS_H
This exception can arise if the given feature code is not found on a license.
@ eDeviceBlacklisted
Device has been added to the blacklist by admin on LicenseSpring platform.
@ eClockTamperedError
Detected that system clock has been set back.
Please, contact support or try to update SDK if you got this exception. Normally should never happen.
This exception means that detected that system clock has been set back.
@ eInitializationError
Invalid Configuration settings.
@ eInvalidOrderIDError
Order with specified ID already exists and ShouldAppend flag set to false.
LicenseNotFoundException(const std::string &message)
@ eUnknownError
Unknown error encountered.
Throws in case signature returned by LicenseSpring server is not valid.
@ eNetworkTimeoutError
Request to the backend has timed out.
@ eNoInternetError
Problems with Internet connection.
Windows only. In case VM detection dll not found, tempered or detection failed.
VMDNotAvailableException(const std::string &message)
This exception can arise if the backend cannot create URL for Single sign-on (SSO)
PasswordChangeNotAllowedException(const std::string &message)
LicenseSpringException(const std::string &message, LSErrorCode errorCode=LSErrorCode::eGeneralLSError)
DeviceNotLicensedException(const std::string &message)
LicenseActivationException(const std::string &message)
@ eMissingEmailError
Missing email in API call for user-based product, probably attempt to get trial license with empty em...
@ eActivationFailed
Internal server error.
Authorization failed, please check your proxy settings.
NetworkTimeoutException(const std::string &message)
LSErrorCode
LicenseSpring Error codes enum.
NoInternetException(const std::string &message)
@ eWatchdogError
Failed to set license watchdog.
LocalLicenseException(const std::string &message)
This exceptions means that Consumption license or feature ran out of resources.
FloatingFeatureDeviceNotInUseException(const std::string &message)
@ eInvalidLicenseFeatureCode
Feature code not found on license.
Throws when license has already been activated maximum number of times.
@ eCannotBeActivatedNow
Current date is behind license start date.
UnknownLicenseSpringException(const std::string &message)
LicenseSpringInternalException(const std::string &message)
Indicates internal server error, please contact support if you face this exception.
@ eLicenseNotFloating
The license is not floating.
This exception can arise if provided api key cannot be used for the request.
@ eVersionError
App version not found on the backend.
Base class for all LicenseSpring exceptions.
CannotBeActivatedNowException(const std::string &message)
InvalidOrderIDException(const std::string &message)
FloatingTimeoutExpiredException(const std::string &message)
This exception means that network operation timed out.
@ eSSOTokenError
Token for SSO is not valid or expired.
@ eMaxFloatingReached
Reached max users count for floating license.
@ eDeviceError
Device from which the call is made is not licensed (Hardware ID mismatch)
This exception can arise if releasing a device on a non-floating license feature.
@ eLicenseNotFound
License not found.
@ eRequestDateHeaderInvalid
Request DateTime header is invalid, please set correct date time on target device,...
Throws when confirmation code from the air gap activation portal is invalid.
@ eLocalLicenseError
SDK could not read or write license to the storage.
Throws when email is missing in API call for user-based product, probably attempt to get trial licens...
ProductNotFoundException(const std::string &message)
ClockTamperedException(const std::string &message)
TrialNotAllowedException(const std::string &message)
Can be thrown in case getting trial licenses is restricted by product license policy.
Throws when product feature does not exist or wrong feature type.
This exception can arise during license check if device has been blacklisted by Product manager.
ProductVersionException(const std::string &message)
LicenseServerException(const std::string &message)
LicenseNoAvailableActivationsException(const std::string &message)
InvalidLicenseFeatureException(const std::string &message)
MissingEmailException(const std::string &message)
Rare exception, can arise if activation is limited to some device count or license transfer is prohib...
SSOTokenException(const std::string &message)
BorrowLicenseException(const std::string &message, LSErrorCode errorCode)
@ eVMDNotAvailable
Windows only, in case VM detection dll not found or tempered.
LicenseStateException(const std::string &message, LSErrorCode errorCode)
Throws when order with specified ID already exists and ShouldAppend flag set to false.
This exception can arise if provided borrowing period bigger than max possible. Or if license borrowi...
@ eProductMismatchError
License product code doesn't correspond to configuration product code.
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
@ eVMNotAllowed
Running on Virtual machine not allowed.
Throws in case installation file not found for requested app version.
ProductMismatchException(const std::string &message)
@ eTrialNotAllowed
Getting trial licenses is restricted by product license policy.
LicenseNotFloatingException(const std::string &message)
@ eSignatureMismatchError
Server signature is not valid.
WatchdogException(const std::string &message)
In case LicenseSpring backend returns unexpected error or something went wrong.
@ eSSOError
Customer account not found or SSO is not set up properly.
InvalidCredentialException(const std::string &message)
This exception can arise during online check of floating license if reached maximum users count for t...
Throws in case computer hardware configuration has been changed or license does not belong to this co...
This exceptions means that license product code doesn't correspond to configuration product code.
SignatureMismatchException(const std::string &message)
FeatureNotFloatingException(const std::string &message)
@ eNotEnoughConsumptionError
Consumption license or feature run out of resources.
ApiKeyException(const std::string &message, LSErrorCode errorCode)
Throws in case license not found on the server.
@ eAuthorizationError
Authorization failed.
This exception means that user or password is wrong.
@ eInvalidCredential
Username does not exist or wrong password provided.
@ eInvalidLicenseFeatureError
Feature does not exist or wrong feature type.
Can be thrown if start date field is set for the license and current date is behind start date.
This exception means that SDK could not read or write license to the storage.
This exception can arise if token for Single sign-on (SSO) is invalid or expired.
This exception can arise on virtual machine when VM detection is enabled but product policy prohibits...
VMIsNotAllowedException(const std::string &message)
This exception can arise if system date time on the current device is incorrectly set.
@ eLicenseSpringInternalError
Internal SDK error, please contact support or try to update SDK.
MaxFloatingReachedException(const std::string &message)
@ eFeatureNotFloating
License feature that should be released is not a floating feature.
@ eServerError
Internal server error.
@ eGeneralLSError
General LicenseSpring error.
@ eFloatingFeatureDeviceNotInUse
Device was never used to check out a floating feature.
SSOException(const std::string &message)
@ eFloatingTimeoutExpired
Floating license borrowing period or floating timeout expired.
@ ePasswordChangeNotAllowed
Password change is restricted by product policy.
This exception can arise if device was never used to check a feature.
LSErrorCode getCode() const
This exception means that SDK cannot reach the server. Because of no internet connection,...
AirGapActivationException(const std::string &message)
Throws in case floating license timeout or borrowing period is expired and it needs to be registered.
AuthorizationException(const std::string &message)
Throws in case of something wrong with Configuration. E.g. wrong API or Shared key.
InvalidLicenseFeatureCodeException(const std::string &message)
RequestDateInvalidException(const std::string &message)
Throws in case product not found on the server.
Throws in case license is in invalid state (disabled, epired or inactive).
This exception can arise if password change is restricted by company policy.
@ eInvalidConfirmationCode
Air gap confirmation code is invalid.
ConfigurationException(const std::string &message)
This exception can arise if setting license watchdog failed.
@ eLicenseNoAvailableActivations
The license has already been activated maximum number of times.
NotEnoughConsumptionException(const std::string &message)
This exception can arise during floating license registration on floating server.
DeviceBlacklistedException(const std::string &message)
@ eProductError
Product not found on the backend.