libUTL++
Exceptions

Exception classes. More...

Classes

class  utl::Exception
 Root of UTL++ exception class hierarchy. More...
 
class  utl::HostOSEx
 Host OS exception (abstract) More...
 
class  utl::AccessDeniedEx
 Access denied exception More...
 
class  utl::FileExistsEx
 File already exists exception More...
 
class  utl::FileNotFoundEx
 File not found exception More...
 
class  utl::InterruptedSyscallEx
 Interrupted system call exception More...
 
class  utl::InvalidAddressEx
 Invalid address/descriptor exception More...
 
class  utl::NonDirectoryComponentEx
 Non-directory component exception More...
 
class  utl::UnknownHostOSEx
 Unknown host OS exception More...
 
class  utl::StreamEx
 Stream exception (abstract) More...
 
class  utl::StreamEOFex
 Stream EOF exception More...
 
class  utl::StreamErrorEx
 Stream I/O error exception More...
 
class  utl::StreamSerializeEx
 Stream serialization exception More...
 
class  utl::NetworkEx
 Network exception (abstract) More...
 
class  utl::ConnectionRefusedEx
 Connection refused exception More...
 
class  utl::AddressInUseEx
 Address in use exception More...
 
class  utl::AddressNotAvailableEx
 Address not available exception More...
 
class  utl::NetworkUnreachableEx
 Network unreachable exception More...
 
class  utl::ConnectionResetEx
 Connection reset by peer exception More...
 
class  utl::HostLookupEx
 Host lookup failure exception More...
 
class  utl::HostNoAddressEx
 Host has no address exception More...
 
class  utl::HostNotFoundEx
 Host not found exception More...
 
class  utl::IllegalValueEx
 Illegal value exception. More...
 
class  utl::UnknownEx
 Unknown exception. More...
 
class  utl::ThreadCancelledEx
 Thread cancelled exception More...
 

Macros

#define UTL_EXCEPTION_DECL(exName, baseExName)
 Declare a simple exception type. More...
 
#define UTL_EXCEPTION_IMPL(exNS, exName, baseExName, name)
 Implement a simple exception type. More...
 

Functions

void utl::errToEx (const utl::Object *object=nullptr)
 Convert libc's errno to an exception. More...
 
void utl::h_errToEx (const utl::Object *object=nullptr)
 Convert libc's h_errno to an exception. More...
 

Detailed Description

Exception classes.

Macro Definition Documentation

◆ UTL_EXCEPTION_DECL

#define UTL_EXCEPTION_DECL (   exName,
  baseExName 
)
Value:
class exName : public baseExName \
{ \
UTL_CLASS_DECL(exName, baseExName); \
\
public: \
exName(utl::Object* object); \
\
exName(const utl::Object& object); \
\
exName(const char* name, utl::Object* object) \
: baseExName(name, object) \
{ \
} \
\
exName(const char* name, const utl::Object& object) \
: baseExName(name, object) \
{ \
} \
\
private: \
void init(); \
{ \
} \
};
void deInit()
De-initialize UTL++.
Root of UTL++ class hierarchy.
Definition: Object.h:52
void init()
Initialize UTL++.

Declare a simple exception type.

Parameters
exNameexception name
baseExNamebase exception name

Definition at line 41 of file Exception.h.

◆ UTL_EXCEPTION_IMPL

#define UTL_EXCEPTION_IMPL (   exNS,
  exName,
  baseExName,
  name 
)
Value:
UTL_CLASS_IMPL(exNS::exName); \
exNS::exName::exName(utl::Object* object) \
: baseExName(name, object) \
{ \
} \
\
exNS::exName::exName(const utl::Object& object) \
: baseExName(name, object) \
{ \
} \
\
{ \
setName(name); \
}
#define UTL_CLASS_IMPL(className)
Implementation of standard UTL++ class functionality.
Definition: macros.h:890
Root of UTL++ class hierarchy.
Definition: Object.h:52
void init()
Initialize UTL++.

Implement a simple exception type.

Parameters
exNSexception namespace
exNameexception name
baseExNamebase exception name
namehuman-readable name

Definition at line 79 of file Exception.h.

Function Documentation

◆ errToEx()

void utl::errToEx ( const utl::Object object = nullptr)

Convert libc's errno to an exception.

Parameters
objectassociated object

◆ h_errToEx()

void utl::h_errToEx ( const utl::Object object = nullptr)

Convert libc's h_errno to an exception.

Parameters
objectassociated object