Centralized representation of a DeskUp runtime error.
More...
#include <desk_up_error.h>
|
| | Error () |
| | Default constructor (represents a non-error).
|
| | Error (Level l, ErrType err, unsigned int t, std::string msg) |
| | Constructs an error with full metadata.
|
| ErrType | type () const noexcept |
| | Returns the error type.
|
| Level | level () const noexcept |
| | Returns the error severity level.
|
| int | attempts () const noexcept |
| | Returns how many times the operation was retried.
|
| windowDesc | whichWindow () const noexcept |
| | Returns the affected window (if available).
|
|
bool | isFatal () const noexcept |
| | Whether the error is fatal.
|
|
bool | isSkippable () const noexcept |
| | Whether the error is skipable.
|
|
bool | isWarning () const noexcept |
| | Whether the error is a warning.
|
|
bool | isError () const noexcept |
| | Whether the error is a system error.
|
|
bool | isRetryable () const noexcept |
| | Whether the error can be retried.
|
|
| operator bool () const noexcept |
| | Converts to true if this instance represents an actual error.
|
Centralized representation of a DeskUp runtime error.
The Error class extends std::runtime_error to attach structured metadata to exceptions thrown across DeskUp subsystems. Each error carries:
- A Level (severity classification)
- An ErrType (category)
- The number of retries attempted (if applicable)
- An optional windowDesc structure indicating the affected window
Conversion utilities (fromLastWinError(), fromSaveError()) map Windows system errors and DeskUp-specific codes to structured Error instances.
- See also
- Level
-
ErrType
-
windowDesc
- Version
- 0.2.1
- Date
- 2025
◆ Error() [1/2]
Default constructor (represents a non-error).
- Version
- 0.2.1
- Date
- 2025
◆ Error() [2/2]
| DeskUp::Error::Error |
( |
Level | l, |
|
|
ErrType | err, |
|
|
unsigned int | t, |
|
|
std::string | msg ) |
|
inline |
Constructs an error with full metadata.
- Parameters
-
| l | Error level (severity). |
| err | Error type (category). |
| t | Number of retries attempted before failure. |
| msg | Descriptive error message. |
- Version
- 0.2.1
- Date
- 2025
◆ attempts()
| int DeskUp::Error::attempts |
( |
| ) |
const |
|
inlinenoexcept |
Returns how many times the operation was retried.
- Returns
- Integer representing the retry count.
◆ fromSaveError()
Converts a SaveErrorCode (from window_desc.cc) into a structured error.
- Parameters
-
| e | Integer error code returned by a save operation. |
- Returns
- A structured Error describing the save failure.
- Version
- 0.2.1
- Date
- 2025
◆ level()
| Level DeskUp::Error::level |
( |
| ) |
const |
|
inlinenoexcept |
Returns the error severity level.
- Returns
- The associated Level.
◆ type()
| ErrType DeskUp::Error::type |
( |
| ) |
const |
|
inlinenoexcept |
Returns the error type.
- Returns
- The associated ErrType.
◆ whichWindow()
Returns the affected window (if available).
- Returns
- A windowDesc associated with this error.
The documentation for this class was generated from the following files: