Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
SystemException Class Reference

#include <elm/sys/SystemException.h>

+ Inheritance diagram for SystemException:

Public Types

enum  error_t {
  OK = 0, NO_ACCESS, NO_MORE_RESOURCE, BAD_PATH,
  IO_ERROR, ALREADY_EXIST
}
 
typedef enum elm::sys::SystemException::error_t error_t
 

Public Member Functions

 SystemException (error_t err, String msg)
 
 SystemException (int code, String header)
 
error_t error (void) const
 
String message () override
 
- Public Member Functions inherited from Exception
virtual ~Exception (void)
 

Detailed Description

This exception is usually thrown due to system related errors.

Member Typedef Documentation

◆ error_t

Member Enumeration Documentation

◆ error_t

enum error_t
Enumerator
OK 
NO_ACCESS 
NO_MORE_RESOURCE 
BAD_PATH 
IO_ERROR 
ALREADY_EXIST 

Constructor & Destructor Documentation

◆ SystemException() [1/2]

SystemException ( error_t  error,
String  message 
)

Build a simple system exception.

Parameters
errorError kind.
messageMessage.

◆ SystemException() [2/2]

SystemException ( int  code,
String  header 
)

Build a system exception from real error code getting message from the system and appending the header with it.

Parameters
codeReal code.
headerHeader used for building the message.

References SystemException::ALREADY_EXIST, SystemException::BAD_PATH, SystemException::IO_ERROR, SystemException::NO_ACCESS, SystemException::NO_MORE_RESOURCE, and StringBuffer::toString().

Member Function Documentation

◆ error()

error_t error ( void  ) const
inline

Get the error kind.

Returns
Error kind.

References elm::io::err.

◆ message()

String message ( )
overridevirtual

Return a message describing the exception.

Returns
Exception message.

Reimplemented from Exception.

Referenced by File::load(), and Parser::parse().


The documentation for this class was generated from the following files: