Passenger::SystemException Class Reference

#include <Exceptions.h>

Inheritance diagram for Passenger::SystemException:

Inheritance graph

List of all members.

Detailed Description

Represents an error returned by a system call or a standard library call.

Use the code() method to find out the value of errno at the time the error occured.

Public Member Functions

 SystemException (const string &message, int errorCode)
 Create a new SystemException.
int code () const throw ()
 The value of errno at the time the error occured.
string brief () const throw ()
 Returns a brief version of the exception message.
string sys () const throw ()
 Returns the system's error message.

Constructor & Destructor Documentation

Passenger::SystemException::SystemException ( const string &  message,
int  errorCode 
) [inline]

Create a new SystemException.

message A message describing the error.
errorCode The error code, i.e. the value of errno right after the error occured.
A system description of the error will be appended to the given message. For example, if errorCode is EBADF, and message is "Something happened", then what() will return "Something happened: Bad file descriptor (10)" (if 10 is the number for EBADF).
code() == errorCode

brief() == message

Member Function Documentation

string Passenger::SystemException::brief (  )  const throw () [inline]

Returns a brief version of the exception message.

This message does not include the system error description, and is equivalent to the value of the message parameter as passed to the constructor.

string Passenger::SystemException::sys (  )  const throw () [inline]

Returns the system's error message.

This message contains both the content of strerror(errno) and the errno number itself.

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

Generated on Tue Jun 24 14:03:44 2008 for Passenger by  doxygen 1.5.5