|
| | ApoCharmmError (const ApoCharmmErrorCode code, const std::string_view message, const std::string_view sourceFile, const std::string_view sourceFunction, const int sourceLine) |
| | Constructs a categorized exception and renders its diagnostic.
|
| |
| ApoCharmmErrorCode | getCode (void) const noexcept |
| | Returns the retained failure category.
|
| |
| std::string_view | getMessage (void) const noexcept |
| | Returns the retained human-readable message.
|
| |
| std::string_view | getSourceFile (void) const noexcept |
| | Returns the normalized source-file spelling.
|
| |
| std::string_view | getSourceFunction (void) const noexcept |
| | Returns the retained source-function spelling.
|
| |
| int | getSourceLine (void) const noexcept |
| | Returns the retained source-line value.
|
| |
Represents a categorized native error with source metadata.
The exception owns copies of its human message, normalized source-file spelling, source function, and source line. The inherited what() diagnostic begins with the apoCHARMM ASCII banner and then reports the category, message, source location, and function. The exception remains catchable as std::runtime_error and std::exception.
Views returned by the string accessors borrow storage from this object. Copying the exception creates an independent logical copy of that metadata. Moving transfers the metadata, and may invalidate views into the moved-from exception.
- Warning
- Do not allow this C++ exception to cross a C ABI boundary. Use the apoCHARMM C ABI guards, which translate it to an apo_status and a thread-local diagnostic.
- See also
- apocharmm_error