lib

Kross::Api::Exception Class Reference

#include <exception.h>

Inheritance diagram for Kross::Api::Exception:

Kross::Api::Object List of all members.

Detailed Description

Common exception class used for representing exceptions in Kross.

Internal we use Exception instances to throw and handle exceptions. Those exceptions are inherited from Object and therefore they are first class citizens in Kross.

Definition at line 38 of file exception.h.


Public Types

typedef KSharedPtr< ExceptionPtr

Public Member Functions

 Exception (const QString &error, long lineno=-1)
virtual ~Exception ()
virtual const QString getClassName () const
virtual const QString toString ()
const QString getError () const
const QString getTrace () const
void setTrace (const QString &tracemessage)
long getLineNo () const

Member Typedef Documentation

Shared pointer to implement reference-counting.

Reimplemented from Kross::Api::Object.

Definition at line 45 of file exception.h.


Constructor & Destructor Documentation

Exception::Exception ( const QString &  error,
long  lineno = -1 
)

Constructor.

Parameters:
error The error message.
lineno The liner number in the scripting code where this exception got thrown.

Definition at line 28 of file exception.cpp.

Exception::~Exception (  )  [virtual]

Destructor.

Definition at line 36 of file exception.cpp.


Member Function Documentation

const QString Exception::getClassName (  )  const [virtual]

See also:
Kross::Api::Object::getClassName()

Implements Kross::Api::Object.

Definition at line 40 of file exception.cpp.

const QString Exception::toString (  )  [virtual]

See also:
Kross::Api::Object::toString()

Reimplemented from Kross::Api::Object.

Definition at line 45 of file exception.cpp.

const QString Exception::getError (  )  const

Returns:
the error message.

Definition at line 52 of file exception.cpp.

const QString Exception::getTrace (  )  const

Returns:
a more detailed tracemessage or QString::null if there is no trace avaiable.

Definition at line 57 of file exception.cpp.

void Exception::setTrace ( const QString &  tracemessage  ) 

Set a more detailed tracemessage.

Definition at line 62 of file exception.cpp.

long Exception::getLineNo (  )  const

Returns:
the line number in the scripting code where the exception got thrown or -1 if there was no line number defined.

Definition at line 67 of file exception.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys