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 Member Functions | Static Public Attributes | List of all members
ctkApplicationException Class Reference

#include <Libs/PluginFramework/service/application/ctkApplicationException.h>

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

Public Member Functions

ctkApplicationExceptionclone () const
 Creates a copy of this exception. Use rethrow() to throw the copy again. More...
 
 ctkApplicationException (int errorCode)
 
 ctkApplicationException (int errorCode, const ctkException &cause)
 
 ctkApplicationException (int errorCode, const QString &message)
 
 ctkApplicationException (int errorCode, const QString &message, const ctkException &cause)
 
int GetErrorCode () const
 
const char * name () const throw ()
 Returns the name for this exception. More...
 
void rethrow () const
 (Re)Throws this exception. More...
 
 ~ctkApplicationException () 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 ()
 

Static Public Attributes

static const int APPLICATION_DUPLICATE_SCHEDULE_ID
 
static const int APPLICATION_EXITVALUE_NOT_AVAILABLE
 
static const int APPLICATION_INTERNAL_ERROR
 
static const int APPLICATION_INVALID_STARTUP_ARGUMENT
 
static const int APPLICATION_LOCKED
 
static const int APPLICATION_NOT_LAUNCHABLE
 
static const int APPLICATION_SCHEDULING_FAILED
 
- Static Public Attributes inherited from ctkBackTrace
static size_t const DefaultStackSize
 

Additional Inherited Members

- 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

This exception is used to indicate problems related to application lifecycle management.

ctkApplicationException object is created by the Application Admin to denote an exception condition in the lifecycle of an application. ctkApplicationExceptions should not be created by developers.
ctkApplicationExceptions are associated with an error code. This code describes the type of problem reported in this exception. The possible codes are:

Definition at line 57 of file ctkApplicationException.h.

Constructor & Destructor Documentation

◆ ctkApplicationException() [1/4]

ctkApplicationException::ctkApplicationException ( int  errorCode)

Creates an ApplicationException with the specified error code.

Parameters
errorCodeThe code of the error

◆ ctkApplicationException() [2/4]

ctkApplicationException::ctkApplicationException ( int  errorCode,
const ctkException cause 
)

Creates a ApplicationException that wraps another exception.

Parameters
errorCodeThe code of the error
causeThe cause of this exception.

◆ ctkApplicationException() [3/4]

ctkApplicationException::ctkApplicationException ( int  errorCode,
const QString &  message 
)

Creates an ApplicationException with the specified error code.

Parameters
errorCodeThe code of the error
messageThe associated message

◆ ctkApplicationException() [4/4]

ctkApplicationException::ctkApplicationException ( int  errorCode,
const QString &  message,
const ctkException cause 
)

Creates a ApplicationException that wraps another exception.

Parameters
errorCodeThe code of the error
messageThe associated message.
causeThe cause of this exception.

◆ ~ctkApplicationException()

ctkApplicationException::~ctkApplicationException ( )
throw (
)

Member Function Documentation

◆ clone()

ctkApplicationException* ctkApplicationException::clone ( ) const
virtual

Creates a copy of this exception. Use rethrow() to throw the copy again.

Returns
A copy of this exception.

Reimplemented from ctkException.

◆ GetErrorCode()

int ctkApplicationException::GetErrorCode ( ) const

Returns the error code associated with this exception.

Returns
The error code of this exception.

◆ name()

const char* ctkApplicationException::name ( ) const
throw (
)
virtual

Returns the name for this exception.

Returns
The exception name.

Reimplemented from ctkException.

◆ rethrow()

void ctkApplicationException::rethrow ( ) const
virtual

(Re)Throws this exception.

Reimplemented from ctkException.

Member Data Documentation

◆ APPLICATION_DUPLICATE_SCHEDULE_ID

const int ctkApplicationException::APPLICATION_DUPLICATE_SCHEDULE_ID
static

The application scheduling failed because the specified identifier is already in use.

Definition at line 95 of file ctkApplicationException.h.

◆ APPLICATION_EXITVALUE_NOT_AVAILABLE

const int ctkApplicationException::APPLICATION_EXITVALUE_NOT_AVAILABLE
static

The exit value is not available for an application instance because the instance has not terminated.

Definition at line 101 of file ctkApplicationException.h.

◆ APPLICATION_INTERNAL_ERROR

const int ctkApplicationException::APPLICATION_INTERNAL_ERROR
static

An exception was thrown by the application or the corresponding container during launch. The exception is available from getCause().

Definition at line 82 of file ctkApplicationException.h.

◆ APPLICATION_INVALID_STARTUP_ARGUMENT

const int ctkApplicationException::APPLICATION_INVALID_STARTUP_ARGUMENT
static

One of the specified startup arguments is invalid, for example its type is not permitted.

Definition at line 107 of file ctkApplicationException.h.

◆ APPLICATION_LOCKED

const int ctkApplicationException::APPLICATION_LOCKED
static

The application couldn't be launched because it is locked.

Definition at line 69 of file ctkApplicationException.h.

◆ APPLICATION_NOT_LAUNCHABLE

const int ctkApplicationException::APPLICATION_NOT_LAUNCHABLE
static

The application is not in launchable state, it's ApplicationDescriptor#APPLICATION_LAUNCHABLE attribute is false.

Definition at line 76 of file ctkApplicationException.h.

◆ APPLICATION_SCHEDULING_FAILED

const int ctkApplicationException::APPLICATION_SCHEDULING_FAILED
static

The application schedule could not be created due to some internal error (for example, the schedule information couldn't be saved due to some storage error).

Definition at line 89 of file ctkApplicationException.h.


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