# wso2wsf::Exception Class Reference
[Exception]

class Exception The Exception Class is an abstract base class that can be used to implement any type of exception. All exception classes used in this project are derived from this class. The process method is what does the necessary processing of the exception that was generated. The others are methods used for string manipulation. More...

`#include <WSFException.h>`

Inheritance diagram for wso2wsf::Exception:

List of all members.

## Public Member Functions
virtual | ~Exception ()
virtual void | process () const =0
virtual | operator std::string () const
std::string | getFaultReason ()
std::string | getFaultCode ()
## Protected Member Functions
| Exception (char const *reason)
| Exception (char const *reason, char const *code)
## Friends
WSF_EXTERN std::ostream & | operator<< (std::ostream &str, Exception const &e)
WSF_EXTERN std::ostream & | operator<< (std::ostream &str, Exception const *e)

## Detailed Description

class Exception The Exception Class is an abstract base class that can be used to implement any type of exception. All exception classes used in this project are derived from this class. The process method is what does the necessary processing of the exception that was generated. The others are methods used for string manipulation.

## Constructor & Destructor Documentation

virtual wso2wsf::Exception::~Exception | ( |  | ) | `[virtual]`

destructor that can be overridden.

wso2wsf::Exception::Exception | ( | char const * | reason | ) | `[protected]`

Constructor accepting a reason for the exception.

Parameters:

  | reason | reason to exception.

wso2wsf::Exception::Exception | ( | char const * | reason,
|  | char const * | code |
| ) |  |  | `[protected]`

Constructor accepting both the reason and code the exception

Parameters:

  | reason | Reason for the exception.
  | code | The Fault code corresponding to the exception.

## Member Function Documentation

std::string wso2wsf::Exception::getFaultCode | ( |  | ) |

Method to get the exception fault code

Returns:
  Returns the fault code

std::string wso2wsf::Exception::getFaultReason | ( |  | ) |

Method to obtain the exception fault reason

Returns:
  Returns the fault reason string

virtual wso2wsf::Exception::operator std::string | ( |  | ) | const`[virtual]`

Operation for obtaining string representation of the exception object. No member fields can be modified within this function. The derived class has the option to override the behavior.

virtual void wso2wsf::Exception::process | ( |  | ) | const`[pure virtual]`

Method for doing the required processing. Must be overridden, for an class that can be constructed.

Implemented in wso2wsf::WSFault.

## Friends And Related Function Documentation

WSF_EXTERN std::ostream& operator<< | ( | std::ostream & | str,
|  | Exception const * | e |
| ) |  |  | `[friend]`

Overloaded insertion operator, is used for printing the exception onto a console.

Parameters:

  | str | existing stream.
  | e | exception object.

Returns:
  a modified output stream is returned.

WSF_EXTERN std::ostream& operator<< | ( | std::ostream & | str,
|  | Exception const & | e |
| ) |  |  | `[friend]`

Overloaded insertion operator, is used for printing the exception onto a console.

Parameters:

  | str | existing stream.
  | e | exception object.

Returns:
  a modified output stream is returned.

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

- WSFException.h