Hide menu
Loading...
Searching...
No Matches
cadex::mtk::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

 LicenseError ()
 Empty constructor.
 
 LicenseError (const std::string &theDetails)
 Specifies detailed message which will be returned by what().
 
const char * what () const noexcept override
 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::mtk::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 LicenseError.hxx:37
const char * what() const noexcept override
Returns an error string.
Definition LicenseError.cxx:50
Contains classes, namespaces, enums, types, and global functions related to Manufacturing Toolkit.
Definition LicenseError.hxx:27
Examples
MTKConverter/Program.cs, MTKConverter/main.cxx, exploring/bom/Program.cs, exploring/bom/main.cxx, exploring/brep_geometry/Program.cs, exploring/brep_geometry/main.cxx, exploring/brep_topology/Program.cs, exploring/brep_topology/main.cxx, exploring/drawings/Program.cs, exploring/drawings/main.cxx, exploring/mesh/Program.cs, exploring/mesh/main.cxx, exploring/pmi/Program.cs, exploring/pmi/main.cxx, machining/dfm_analyzer/Program.cs, machining/dfm_analyzer/main.cxx, machining/feature_recognizer/Program.cs, machining/feature_recognizer/main.cxx, meshing/mesh_generation/Program.cs, meshing/mesh_generation/main.cxx, molding/dfm_analyzer/Program.cs, molding/dfm_analyzer/main.cxx, molding/feature_recognizer/Program.cs, molding/feature_recognizer/main.cxx, nesting/nesting_computer/Program.cs, nesting/nesting_computer/main.cxx, projector/poly_projector/Program.cs, projector/poly_projector/main.cxx, sheet_metal/dfm_analyzer/Program.cs, sheet_metal/dfm_analyzer/main.cxx, sheet_metal/feature_recognizer/Program.cs, sheet_metal/feature_recognizer/main.cxx, sheet_metal/unfolder/Program.cs, sheet_metal/unfolder/main.cxx, utilities/progress_bar/Program.cs, utilities/progress_bar/main.cxx, utilities/thumbnail_generation/Program.cs, utilities/thumbnail_generation/main.cxx, wall_thickness/analyzer/Program.cs, and wall_thickness/analyzer/main.cxx.

Constructor & Destructor Documentation

◆ LicenseError() [1/2]

cadex::mtk::LicenseError::LicenseError ( )
inline

Empty constructor.

◆ LicenseError() [2/2]

cadex::mtk::LicenseError::LicenseError ( const std::string & theDetails)
inline

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

Member Function Documentation

◆ what()

const char * cadex::mtk::LicenseError::what ( ) const
overridenoexcept