An exception object to indicate failure to connect to X server. More...
#include <exception.hh>
Static Public Member Functions | |
static void | raise (const std::string &display_name) |
Throw a connection error. More... | |
Static Public Member Functions inherited from minxlib::exception | |
static void | pythonize () |
Expose exception interface to Python. More... | |
Additional Inherited Members | |
Public Member Functions inherited from minxlib::exception | |
virtual | ~exception () throw () |
Virtual destructor. More... | |
Protected Types inherited from minxlib::exception | |
typedef void(* | py_func )() |
Signature for Pythonize functions. More... | |
Protected Member Functions inherited from minxlib::exception | |
exception (const std::string &msg) | |
Construct base exception object. More... | |
Static Protected Member Functions inherited from minxlib::exception | |
static bool | register_pythonize (type_info t, py_func f) |
Register subclass's pythonize function. More... | |
static void | set_py_exception (type_info t, PyObject *e) |
Register Python exception class object for a subclass. More... | |
static PyObject * | get_py_exception (type_info t) |
Retrieve Python exception class for specified C++ type. More... | |
template<typename T > | |
static void | translate (const T &e) |
Generic Boost.Python exception translator. More... | |
template<typename T > | |
static void | register_translator () |
Register Boost.Python exception translator for type T. More... | |
An exception object to indicate failure to connect to X server.
When a minxlib::display object is created, if it fails to connect to the X server, the display class's constructor will throw an instance of this class to indicate the failure. On the Python side of Minx, this class is derived from minxlib.exception, which, in turn, is derived from the standard Python Exception class.
|
static |
Throw a connection error.
display_name | Name of display to which connection failed. |
This function throws a connection_error. Clients cannot directly instantiate this class and throw it. Instead, they must call this function to have the object created and thrown.
When raising a connection_error, the client must specify the name of X display to which the connection attempt failed. XDisplayName(), for example, will return something usable; refer to the Xlib documentation for further details.