Skip to content

Class XiLensError

ClassList > XiLensError

Represents an error class for handling exceptions specific to the XiLens application. More...

  • #include <errors.h>

Inherits the following classes: std::exception

Public Types

Type Name
enum Code

Public Functions

Type Name
XiLensError (const Code code=Code::None, const std::string & message="")
Code code () const
Queries the error code.
const std::string & message () const
Queries the error message corresponding to the error.
std::string toString () const
Converts error code and additional message into a human-readable string.

Public Static Functions

Type Name
std::string errorCodeToString (const Code code)
Converts an error code into a string representation.

Detailed Description

This class is used to encapsulate and manage error details, including error codes, messages, and other related properties associated with errors in the XiLens application. It provides an interface for retrieving error information and debugging issues encountered during application runtime.

Public Types Documentation

enum Code

enum XiLensError::Code {
    None,
    FileInconsistentMetadata
};

Public Functions Documentation

function XiLensError

inline explicit XiLensError::XiLensError (
    const Code code=Code::None,
    const std::string & message=""
) 

Constructs a XiLensError object with a specific error code and associated error message.

Parameters:

  • code The error code indicating the type of error. Default value is Code::None.
  • message A human-readable message providing additional details about the error. Default value is an empty string.

Returns:

An instance of XiLensError initialized with the provided code and message.


function code

Queries the error code.

inline Code XiLensError::code () const

Returns:

TThe error code.


function message

Queries the error message corresponding to the error.

inline const std::string & XiLensError::message () const

Returns:

error message.


function toString

Converts error code and additional message into a human-readable string.

inline std::string XiLensError::toString () const

Returns:

human readable error code representation + additional error message.


Public Static Functions Documentation

function errorCodeToString

Converts an error code into a string representation.

static inline std::string XiLensError::errorCodeToString (
    const Code code
) 

Parameters:

  • code error code.

Returns:

string representation of the error code.



The documentation for this class was generated from the following file src/errors.h