lib
Kross::Api::Exception Class Reference
#include <exception.h>
Inheritance diagram for Kross::Api::Exception:

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< Exception > | Ptr |
Public Member Functions | |
Exception (const QString &error, long lineno=-1, Object::Ptr parent=0) | |
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
typedef KSharedPtr<Exception> Kross::Api::Exception::Ptr |
Shared pointer to implement reference-counting.
Reimplemented from Kross::Api::Object.
Definition at line 56 of file exception.h.
Constructor & Destructor Documentation
Exception::Exception | ( | const QString & | error, | |
long | lineno = -1 , |
|||
Object::Ptr | parent = 0 | |||
) |
Constructor.
- Parameters:
-
error The error message. lineno The liner number in the scripting code where this exception got thrown. parent The parent Object or NULL if this exception object doesn't has a parent.
Definition at line 28 of file exception.cpp.
Exception::~Exception | ( | ) | [virtual] |
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::getError | ( | ) | const |
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.
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 | ) |
const QString Exception::toString | ( | ) | [virtual] |
- See also:
- Kross::Api::Object::toString()
Reimplemented from Kross::Api::Object.
Definition at line 45 of file exception.cpp.
The documentation for this class was generated from the following files: