CAD Exchanger SDK
cadex::LicenseManager_LicenseError Class Reference

Defines an exception thrown by a license manager when a valid license could not be acquired. More...

Inherits exception.

Public Member Functions

 LicenseManager_LicenseError ()
 
 LicenseManager_LicenseError (const std::string &theDetails)
 
const char * what () const override throw ()
 Returns an error string. More...
 

Protected Attributes

std::string myDetails
 

Detailed Description

Defines an exception thrown by a license manager when a valid license could not be acquired.

CAD Exchanger License Manager throws this exception when it cannot acquire a valid license protecting some CAD Exchanger classes. It can be used to distinguish an exception thrown by CAD Exchanger from any other.

Example:

try {
...
} catch (const cadex::LicenseManager_LicenseError& anError) {
std::cerr << "Could not acquire valid CAD Exchanger license. Reason: " << anError.what() << std::endl;
} catch (...) {
std::cerr << "Unprocessed exception caught" << std::endl;
}

Constructor & Destructor Documentation

◆ LicenseManager_LicenseError() [1/2]

cadex::LicenseManager_LicenseError::LicenseManager_LicenseError ( )
inline

Empty constructor.

◆ LicenseManager_LicenseError() [2/2]

cadex::LicenseManager_LicenseError::LicenseManager_LicenseError ( const std::string &  theDetails)
inline

Specifies detailed message which will be returned by what().

Member Function Documentation

◆ what()

const char * cadex::LicenseManager_LicenseError::what ( ) const
throw (
)
override

Returns an error string.

Returns a detailed message specified in constructor.