mpqc::SyscallFailed Class Reference
Collaboration diagram for mpqc::SyscallFailed:

Documentation

This is thrown when an system call fails with an errno.

Public Member Functions

 SyscallFailed (const char *description=0, const char *source_file=0, int line=0, const char *syscall=0, int err=0, const char *exception_type="SyscallFailed") noexcept
 
 SyscallFailed (const SyscallFailed &) noexcept
 
 SyscallFailed (SyscallFailed &&)=default
 
virtual ~SyscallFailed ()=default
 
const char * syscall () const noexcept
 
int err () const noexcept
 Return the error code that the system call returned. More...
 
- Public Member Functions inherited from mpqc::SystemException
 SystemException (const char *description=0, const char *file=0, int line=0, const char *exception_type="SystemException") noexcept
 
 SystemException (const SystemException &)=default
 
 SystemException (SystemException &&)=default
 
virtual ~SystemException ()=default
 
- Public Member Functions inherited from mpqc::Exception
 Exception (const char *description=0, const char *file=0, int line=0, const char *exception_type="Exception") noexcept
 
 Exception (const Exception &) noexcept
 
 Exception (Exception &&)=default
 
virtual ~Exception () noexcept
 
const char * what () const noexcept
 overload of Exception::what() More...
 
const char * exception_type () const noexcept
 Returns the classname of the exception. May return null. More...
 
std::ostream & elaborate ()
 
- Public Member Functions inherited from mpqc::detail::Exception
 Exception (const char *description=0, const char *file=0, int line=0) noexcept
 
 Exception (const Exception &)=default
 
 Exception (Exception &&)=default
 
const char * description () const noexcept
 
const char * file () const noexcept
 
int line () const noexcept
 

Constructor & Destructor Documentation

◆ SyscallFailed() [1/3]

SyscallFailed::SyscallFailed ( const char *  description = 0,
const char *  source_file = 0,
int  line = 0,
const char *  syscall = 0,
int  err = 0,
const char *  exception_type = "SyscallFailed" 
)
noexcept

Create a SyscallFailed exception.

Parameters
descriptiona description of the problem.
source_filethe file name where the problem occured.
linethe line number where the exception occured.
syscallthe name of the syscall that failed.
errthe error returned by the failed syscall.
exception_typethe classname of the Exception specialization. The default is "SyscallFailed".

It is suggested that the special macros FILE and LINE be given as the file and line arguments, respectively.

◆ SyscallFailed() [2/3]

SyscallFailed::SyscallFailed ( const SyscallFailed ref)
noexcept

◆ SyscallFailed() [3/3]

mpqc::SyscallFailed::SyscallFailed ( SyscallFailed &&  )
default

◆ ~SyscallFailed()

virtual mpqc::SyscallFailed::~SyscallFailed ( )
virtualdefault

Member Function Documentation

◆ err()

int mpqc::SyscallFailed::err ( ) const
inlinenoexcept

Return the error code that the system call returned.

◆ syscall()

const char* mpqc::SyscallFailed::syscall ( ) const
inlinenoexcept

Returns the file name of the file that caused the error, if known. Otherwise 0 is returned.


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