#include <exception.h>
Inheritance diagram for SaX::SaXException:
Signals | |
void | saxProcessFailed (void) |
void | saxImportSectionFailed (void) |
void | saxExportSectionFailed (void) |
void | saxFileOpenFailed (int) |
void | saxNoStorage (int) |
void | saxCDBFileFailed (void) |
void | saxPermissionDenied (void) |
void | saxProfileNotFound (void) |
void | saxProfileUndefined (int) |
void | saxImportAlreadyAdded (int) |
void | saxUnknownImport (SaXImport *) |
void | saxNoAPIFileFound (void) |
void | saxNullPointerArgument (void) |
void | saxDesktopImportBindFailed (int) |
void | saxCardImportBindFailed (int) |
void | saxPointerImportBindFailed (int) |
void | saxKeyboardImportBindFailed (int) |
void | saxPathImportBindFailed (int) |
void | saxExtensionsImportBindFailed (int) |
void | saxLayoutImportBindFailed (int) |
void | saxXKBLoadRulesFailed (void) |
void | saxCDBRecordNotFound (const char *) |
void | saxWrongInputFashion (const char *) |
void | saxPointerFashionTypeFailed (const char *) |
void | saxSetStorageIDFailed (int) |
void | saxInvalidArgument (int) |
void | saxInvalidArgument (const char *) |
void | saxLockSetFailed (int) |
void | saxLockUnsetFailed (int) |
void | saxGetScreenLayoutFailed (int) |
void | saxEmptyCDBGroup (const char *) |
void | saxGetInputLayoutFailed (void) |
void | saxNvidiaDriverMissing (void) |
void | saxNvidiaDriverInstalled (void) |
void | saxXKBLayoutUndefined (const char *) |
void | saxDriverMismatch (const char *, const char *) |
void | saxGlobalException (const char *) |
Public Member Functions | |
void | setDebug (bool=true) |
int | errorCode (void) |
void | errorReset (void) |
bool | havePrivileges (void) |
QString | errorString (void) |
QString | errorValue (void) |
void | excProcessFailed (void) |
process did not start | |
void | excImportSectionFailed (void) |
import cannot initialize section option | |
void | excExportSectionFailed (void) |
export cannot initialize section file | |
void | excFileOpenFailed (int) |
file open failed | |
void | excNoStorage (int) |
there is no data in the storage for ID X | |
void | excCDBFileFailed (void) |
CDB file does not exist. | |
void | excPermissionDenied (void) |
root privileges required | |
void | excProfileNotFound (void) |
profile file not found | |
void | excProfileUndefined (int) |
profile does not include the requested section | |
void | excImportAlreadyAdded (int) |
a SaXImport object of this type was already added | |
void | excUnknownImport (SaXImport *) |
the section ID of this SaXImport object is unknown | |
void | excNoAPIFileFound (void) |
the /var/lib/sax/apidata file does not exist | |
void | excNullPointerArgument (void) |
a NULL pointer was used as argument | |
void | excXKBLoadRulesFailed (void) |
the /usr/X11R6/lib/X11/xkb/rules/(rule) file couldn't be opened | |
void | excCDBRecordNotFound (const char *) |
the group search for a CDB data record has failed | |
void | excWrongInputFashion (const char *) |
the given InputFashion type is invalid refering to pointers.h | |
void | excSetStorageIDFailed (int) |
setID could not find a record with ID (id) | |
void | excInvalidArgument (int) |
wrong argument set for member call | |
void | excInvalidArgument (const char *) |
wrong argument set for member call | |
void | excDesktopImportBindFailed (int) |
the wrong import object was used for this manipulator (desktop) | |
void | excCardImportBindFailed (int) |
the wrong import object was used for this manipulator (card) | |
void | excPointerImportBindFailed (int) |
the wrong import object was used for this manipulator (pointers) | |
void | excKeyboardImportBindFailed (int) |
the wrong import object was used for this manipulator (keyboard) | |
void | excPathImportBindFailed (int) |
the wrong import object was used for this manipulator (path) | |
void | excLayoutImportBindFailed (int) |
the wrong import object was used for this manipulator (layout) | |
void | excExtensionsImportBindFailed (int) |
the wrong import object was used for this manipulator (extensions) | |
void | excPointerFashionTypeFailed (const char *) |
wrong input fashion type, expected SAX_INPUT_PEN or SAX_INPUT_ERASER | |
void | excLockSetFailed (int) |
the call to flock LOCK_EX failed | |
void | excLockUnsetFailed (int) |
the call to flock LOCK_UN failed | |
void | excGetScreenLayoutFailed (int) |
empty screen definition in layout section for screen ID (id) | |
void | excEmptyCDBGroup (const char *) |
No CDB record found for cardName. | |
void | excGetInputLayoutFailed (void) |
empty InputDevice definition in layout section | |
void | excNvidiaDriverMissing (void) |
The binary NVIDIA driver is missing. | |
void | excNvidiaDriverInstalled (void) |
The binary NVIDIA driver is installed. | |
void | excXKBLayoutUndefined (const char *) |
layout not defined/used -> variant cannot be set | |
void | excDriverMismatch (const char *, const char *) |
2D/3D driver from CDB doesn't match current driver | |
SaXException (void) | |
Protected Member Functions | |
bool | setLock (void) |
bool | unsetLock (void) |
The SaXException class is a container for all exceptions of the library. It provides methods to set and retrieve error codes and error strings. Within the library each class which may run into an error inherits from SaXException and therefore each SaX* class stores their errors inside the object instance. The programmer is able to use the methods obj->errorCode() and obj->errorString() to obtain possible errors or the programmer can create its own exception class which needs to inherit from SaXException. While constructing an object of this exception class the programmer needs to pass the SaX* object which should be watched to the constructor of its own class. If an error occurs the appropriate exception method is called. The following example will show how to make use of the libsax exception handling:
my_excpetion.h
class myException : public SaXException { Q_OBJECT public: myException (SaXException*); private slots: void processFailed ( void ); void permissionDenied ( void ); };
my_exception.cpp
#include "my_exception.h" myException::myException (SaXException* mException) { connect ( mException, SIGNAL (saxProcessFailed (void)), this , SLOT (processFailed (void)) ); connect ( mException, SIGNAL (saxPermissionDenied (void)), this , SLOT (permissionDenied (void)) ); } void myException::processFailed (void) { printf ("Process failed...\n"); } void myException::permissionDenied (void) { printf ("Permission denied...\n"); }
sample.cpp
int main (void) { SaXException::setDebug(); SaXInit* init = new SaXInit; myException* e = new myException ( init ); ... }
Definition at line 269 of file exception.h.
|
An object of this type is used to create a container for handling and providing error messages Definition at line 55 of file exception.cpp. |
|
obtain currently set error code, on success 0 is returned Implements SaX::SaXExceptionIF. Definition at line 145 of file exception.cpp. |
|
reset all error items including the error code the error message and the error value Implements SaX::SaXExceptionIF. Definition at line 132 of file exception.cpp. |
|
|
obtain currently set error value, if no value was defined the string "(null)" is returned Implements SaX::SaXExceptionIF. Definition at line 167 of file exception.cpp. |
|
check for root privileges, on success true is returned Implements SaX::SaXExceptionIF. Definition at line 181 of file exception.cpp. Referenced by SaX::SaXExport::doExport(), and SaX::SaXInit::doInit(). |
|
Enable debugging for internal libsax messages Implements SaX::SaXExceptionIF. Definition at line 68 of file exception.cpp. References SaX::DEBUG. Referenced by LML::SaXPluglib::setDebug(). |
|
Apply an advisory lock on the open file specified by mFD for this call /dev/zero is used as file reference Definition at line 195 of file exception.cpp. References errorString(), and excLockSetFailed(). Referenced by SaX::SaXConfig::createConfiguration(), SaX::SaXInit::needInit(), SaX::SaXConfig::SaXConfig(), and SaX::SaXManipulateVNC::setPassword(). Here is the call graph for this function: ![]() |
|
Remove an advisory lock on the open file specified by mFD for this call /dev/zero is used as file reference Definition at line 212 of file exception.cpp. References errorString(), and excLockUnsetFailed(). Referenced by SaX::SaXConfig::createConfiguration(), SaX::SaXInit::needInit(), SaX::SaXConfig::SaXConfig(), and SaX::SaXManipulateVNC::setPassword(). Here is the call graph for this function: ![]() |