#include <exception.h>
Public Types | |
| typedef TDESharedPtr< Exception > | Ptr |
| Public Types inherited from Kross::Api::Object | |
| typedef TDESharedPtr< Object > | Ptr |
Public Member Functions | |
| Exception (const TQString &error, long lineno=-1) | |
| virtual | ~Exception () |
| virtual const TQString | getClassName () const |
| virtual const TQString | toString () |
| const TQString | getError () const |
| const TQString | getTrace () const |
| void | setTrace (const TQString &tracemessage) |
| long | getLineNo () const |
| Public Member Functions inherited from Kross::Api::Object | |
| Object () | |
| virtual | ~Object () |
| virtual Object::Ptr | call (const TQString &name, TDESharedPtr< List > arguments) |
| virtual TQStringList | getCalls () |
Additional Inherited Members | |
| Static Public Member Functions inherited from Kross::Api::Object | |
| template<class T> | |
| static T * | fromObject (Object::Ptr object) |
| template<typename TYPE> | |
| static Object::Ptr | toObject (TYPE t) |
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.
Member Typedef Documentation
◆ Ptr
| typedef TDESharedPtr<Exception> Kross::Api::Exception::Ptr |
Shared pointer to implement reference-counting.
Definition at line 45 of file exception.h.
Constructor & Destructor Documentation
◆ Exception()
| Exception::Exception | ( | const TQString & | 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()
|
virtual |
Destructor.
Definition at line 36 of file exception.cpp.
Member Function Documentation
◆ getClassName()
|
virtual |
Implements Kross::Api::Object.
Definition at line 40 of file exception.cpp.
◆ getError()
| const TQString Exception::getError | ( | ) | const |
- Returns
- the error message.
Definition at line 52 of file exception.cpp.
◆ getLineNo()
| 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.
◆ getTrace()
| const TQString Exception::getTrace | ( | ) | const |
- Returns
- a more detailed tracemessage or TQString() if there is no trace avaiable.
Definition at line 57 of file exception.cpp.
◆ setTrace()
| void Exception::setTrace | ( | const TQString & | tracemessage | ) |
Set a more detailed tracemessage.
Definition at line 62 of file exception.cpp.
◆ 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:
