DeskUp 0.3
Loading...
Searching...
No Matches
desk_up_error.h File Reference

Error management system for DeskUp (centralized error representation and conversion utilities). More...

Include dependency graph for desk_up_error.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  DeskUp::Error
 Centralized representation of a DeskUp runtime error. More...

Typedefs

template<typename T>
using DeskUp::Result = std::expected<T, DeskUp::Error>
 Alias for an operation result that either holds a value or a DeskUp error.
using DeskUp::Status = std::expected<void, DeskUp::Error>
 Alias for an operation that returns success or failure (void on success).

Enumerations

enum class  DeskUp::Level {
  Fatal , Error , Warning , Retry ,
  Info , Debug , Default , Skip ,
  None
}
 Represents the severity of an error. More...
enum class  DeskUp::ErrType {
  InsufficientMemory , AccessDenied , SharingViolation , Io ,
  NotFound , DiskFull , DeviceNotFound , Timeout ,
  ResourceBusy , FileNotFound , InvalidFormat , InvalidInput ,
  CorruptedData , OutOfRange , NetworkError , ConnectionRefused ,
  HostUnreachable , ProtocolError , Unexpected , NotImplemented ,
  PolicyUpdated , FunctionFailed , Default , None
}
 Represents the underlying type or origin of an error. More...

Detailed Description

Error management system for DeskUp (centralized error representation and conversion utilities).

This file is part of DeskUp

Author
Nicolas Serrano Garcia serra.nosp@m.noga.nosp@m.rcian.nosp@m.icol.nosp@m.as@gm.nosp@m.ail..nosp@m.com
Date
2025

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Typedef Documentation

◆ Result

template<typename T>
using DeskUp::Result = std::expected<T, DeskUp::Error>

Alias for an operation result that either holds a value or a DeskUp error.

Template Parameters
TThe success type.
Version
0.2.1
Date
2025

◆ Status

using DeskUp::Status = std::expected<void, DeskUp::Error>

Alias for an operation that returns success or failure (void on success).

Version
0.2.1
Date
2025

Enumeration Type Documentation

◆ ErrType

enum class DeskUp::ErrType
strong

Represents the underlying type or origin of an error.

Each enumerator identifies a distinct class of errors so that DeskUp can map platform or library failures into portable internal types.

See also
DeskUp::Error
Version
0.2.1
Date
2025
Enumerator
InsufficientMemory 

Memory allocation failed or system out of resources.

AccessDenied 

Permission denied by the OS or file system.

SharingViolation 

Another process holds an exclusive lock.

Io 

Generic input/output error.

NotFound 

Resource not found.

DiskFull 

Storage volume full.

DeviceNotFound 

Device unavailable or disconnected.

Timeout 

Operation timed out.

ResourceBusy 

Resource is in use.

FileNotFound 

File could not be located.

InvalidFormat 

Invalid file or data format.

InvalidInput 

Invalid parameter passed by the caller.

CorruptedData 

Data corruption detected.

OutOfRange 

Index or parameter out of valid range.

NetworkError 

Generic network failure.

ConnectionRefused 

Connection attempt refused.

HostUnreachable 

Target host cannot be reached.

ProtocolError 

Violation of expected protocol behavior.

Unexpected 

Unexpected runtime condition.

NotImplemented 

Feature not yet implemented.

PolicyUpdated 

External factors like dll dependencies have changed.

FunctionFailed 

Generic function fail.

Default 

Unspecified error type.

None 

Represents no error.

◆ Level

enum class DeskUp::Level
strong

Represents the severity of an error.

This enumeration provides a consistent way to classify errors by their impact and intended handling behavior.

  • Fatal → unrecoverable; execution must stop.
  • Error → serious failure; operation aborted.
  • Warning → non-critical issue; user notification recommended.
  • Retry → recoverable error that may succeed upon retry.
  • Info → informational message, not an error.
  • Debug → debug-only diagnostic message.
  • Default → unspecified severity.
  • None → represents the absence of error.
See also
DeskUp::Error
Version
0.2.1
Date
2025