CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Types | Public Member Functions | List of all members
ctkServiceException Class Reference

#include <Libs/PluginFramework/ctkServiceException.h>

Inheritance diagram for ctkServiceException:
Inheritance graph
[legend]
Collaboration diagram for ctkServiceException:
Collaboration graph
[legend]

Public Types

enum  Type {
  UNSPECIFIED = 0 , UNREGISTERED = 1 , FACTORY_ERROR = 2 , FACTORY_EXCEPTION = 3 ,
  REMOTE = 5 , FACTORY_RECURSION = 6
}
 

Public Member Functions

ctkServiceExceptionclone () const
 
 ctkServiceException (const ctkServiceException &o)
 
 ctkServiceException (const QString &msg, const ctkException &cause)
 
 ctkServiceException (const QString &msg, const Type &type, const ctkException &cause)
 
 ctkServiceException (const QString &msg, const Type &type=UNSPECIFIED)
 
Type getType () const
 
const char * name () const throw ()
 
ctkServiceExceptionoperator= (const ctkServiceException &o)
 
void rethrow () const
 
 ~ctkServiceException () throw ()
 
- Public Member Functions inherited from ctkRuntimeException
 ctkRuntimeException (const ctkRuntimeException &exc)
 
 ctkRuntimeException (const QString &msg)
 
 ctkRuntimeException (const QString &msg, const ctkException &exc)
 
ctkRuntimeExceptionoperator= (const ctkRuntimeException &exc)
 
 ~ ctkRuntimeException () throw ()
 
- Public Member Functions inherited from ctkException
const ctkExceptioncause () const throw ()
 Gets the nested exception which caused this exception. More...
 
virtual const char * className () const throw ()
 Returns the class name for this exception. More...
 
 ctkException (const ctkException &o)
 Copy constructor. More...
 
 ctkException (const QString &msg)
 Create a new ctkException. More...
 
 ctkException (const QString &msg, const ctkException &cause)
 Create a new ctkException containing another exception as the cause. More...
 
QString message () const throw ()
 Returns the detail message string of this exception. More...
 
ctkExceptionoperator= (const ctkException &o)
 Assignment operator. More...
 
TraceManipulator printStackTrace () const
 Returns an object suitable for printing this executable and its backtrace via qDebug(). More...
 
void setCause (const ctkException &cause)
 Sets the cause for this exception. More...
 
virtual const char * what () const throw ()
 Returns a static string describing this exception. More...
 
 ~ctkException () throw ()
 
- Public Member Functions inherited from ctkBackTrace
 ctkBackTrace (const ctkBackTrace &other)
 
 ctkBackTrace (size_t framesNumber=DefaultStackSize)
 Create a back trace. More...
 
void * returnAddress (unsigned frameNumber) const
 Get the return address for a given stack frame. More...
 
QString stackFrame (unsigned frameNumber) const
 Get a textual representation for a given stack frame. More...
 
size_t stackSize () const
 Get the stack size. More...
 
QList< QString > stackTrace () const
 Provides programmatic access to the stack trace information. More...
 
virtual ~ctkBackTrace () throw ()
 

Additional Inherited Members

- Static Public Attributes inherited from ctkBackTrace
static size_t const DefaultStackSize
 
- Protected Member Functions inherited from ctkException
virtual QDebug printStackTrace (QDebug dbg) const
 Print the stack trace of this exception using the given QDebug object. More...
 

Detailed Description

A service exception used to indicate that a service problem occurred.

A ctkServiceException object is created by the Framework or to denote an exception condition in the service. An enum type is used to identify the exception type for future extendability.

This exception conforms to the general purpose exception chaining mechanism.

Definition at line 43 of file ctkServiceException.h.

Member Enumeration Documentation

◆ Type

Enumerator
UNSPECIFIED 

No exception type is unspecified.

UNREGISTERED 

The service has been unregistered.

FACTORY_ERROR 

The service factory produced an invalid service object.

FACTORY_EXCEPTION 

The service factory threw an exception.

REMOTE 

An error occurred invoking a remote service.

FACTORY_RECURSION 

The service factory resulted in a recursive call to itself for the requesting plugin.

Definition at line 47 of file ctkServiceException.h.

Constructor & Destructor Documentation

◆ ctkServiceException() [1/4]

ctkServiceException::ctkServiceException ( const QString &  msg,
const Type type = UNSPECIFIED 
)

Creates a ctkServiceException with the specified message and type.

Parameters
msgThe associated message.
typeThe type for this exception.

◆ ctkServiceException() [2/4]

ctkServiceException::ctkServiceException ( const QString &  msg,
const Type type,
const ctkException cause 
)

Creates a ctkServiceException with the specified message, type and exception cause.

Parameters
msgThe associated message.
typeThe type for this exception.
causeThe cause of this exception.

◆ ctkServiceException() [3/4]

ctkServiceException::ctkServiceException ( const QString &  msg,
const ctkException cause 
)

Creates a ctkServiceException with the specified message and exception cause.

Parameters
msgThe associated message.
causeThe cause of this exception.

◆ ctkServiceException() [4/4]

ctkServiceException::ctkServiceException ( const ctkServiceException o)

◆ ~ctkServiceException()

ctkServiceException::~ctkServiceException ( )
throw (
)

Member Function Documentation

◆ clone()

ctkServiceException* ctkServiceException::clone ( ) const
virtual
See also
ctkException::clone()

Reimplemented from ctkRuntimeException.

◆ getType()

Type ctkServiceException::getType ( ) const

Returns the type for this exception or UNSPECIFIED if the type was unspecified or unknown.

Returns
The type of this exception.

◆ name()

const char* ctkServiceException::name ( ) const
throw (
)
virtual
See also
ctkException::name()

Reimplemented from ctkRuntimeException.

◆ operator=()

ctkServiceException& ctkServiceException::operator= ( const ctkServiceException o)

◆ rethrow()

void ctkServiceException::rethrow ( ) const
virtual
See also
ctkException::rethrow()

Reimplemented from ctkRuntimeException.


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