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.

License Manager throws this exception when it cannot acquire a valid license for protected components. Use it to distinguish license-related errors from other exceptions.

Example:

try {
cadex::... aReader;
...
} catch (const cadex::LicenseManager_LicenseError& anError) {
std::cerr << "Could not acquire a valid product 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:40
const char * what() const override
Returns an error string.
Definition LicenseManager_LicenseError.cxx:52
Contains classes, namespaces, enums, types, and global functions related to Manufacturing Toolkit.
Definition LicenseManager_LicenseError.hxx:30

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.