Hide menu
Loading...
Searching...
No Matches
cadex::LicenseManager_LicenseError Class Reference

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

#include <cadex/LicenseManager_LicenseError.hxx>

Inherits std::exception.

Public Member Functions

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

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 {
cadex::ACIS_Reader aReader;
...
} 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;
}
Defines an exception thrown by a license manager when a valid license could not be acquired.
Definition LicenseManager_LicenseError.hxx:36
const char * what() const override
Returns an error string.
Definition LicenseManager_LicenseError.cxx:53

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.