AXCEL C++ Framework
Elegance through abstraction
|
Exception class. More...
#include <axcel.h>
Public Member Functions | |
string | type () |
Get type of object. | |
operator string () | |
Convert to string. | |
bool | operator! () |
exception () | |
exception (int number) | |
exception (const exception &e) | |
exception (const char *msg) | |
exception & | operator= (int number) |
exception & | operator= (const exception e) |
exception & | operator= (const char *msg) |
bool | operator== (exception e) |
bool | operator== (const char *s) |
bool | operator== (int num) |
bool | operator!= (exception e) |
bool | operator!= (const char *s) |
bool | operator!= (int num) |
Public Attributes | |
int | no |
errno value | |
string | desc |
Exception class.
An instance of this class is a public data member of all classes inheriting from the object class. It is to contain the POSIX.1 error number and message of the last error that occurred with the object.
axcel::exception::operator string | ( | ) | [virtual] |
Convert to string.
Implements axcel::object.
exception & axcel::exception::operator= | ( | const char * | msg | ) |
string axcel::exception::type | ( | ) | [virtual] |
errno value
no can be set to one of the following constants to indicate the type of error:
struct errno_str errno_strs[] = { {0, "unknown error"}, {EPERM, "operation not permitted"}, {ENOENT, "no such file or directory"}, {ESRCH, "no such process"}, {EINTR, "interrupted function call"}, {EIO, "input/output error"}, {ENXIO, "no such device or address"}, {E2BIG, "argument list too long"}, {ENOEXEC, "exec format error"}, {EBADF, "bad file descriptor"}, {ECHILD, "no child process"}, {EAGAIN, "resource temporarily unavailable"}, {ENOMEM, "not enough space"}, {EACCES, "permission denied"}, {EFAULT, "bad address"}, {EBUSY, "device or resource busy"}, {EEXIST, "file exists"}, {EXDEV, "improper link"}, {ENODEV, "no such device"}, {ENOTDIR, "not a directory"}, {EISDIR, "is a directory"}, {ENFILE, "too many open files in system"}, {EMFILE, "too many open files"}, {ENOTTY, "inappropriate i/o control operation"}, {EFBIG, "file too large"}, {ENOSPC, "no space left on device"}, {ESPIPE, "invalid seek"}, {EROFS, "read-only file system"}, {EMLINK, "too many links"}, {EPIPE, "broken pipe"}, {EDOM, "mathematics argument out of domain of function"}, {EDEADLK, "resource deadlock avoided"}, {ENAMETOOLONG, "filename too long"}, {ENOLCK, "no locks available"}, {ENOSYS, "function not implemented"}, {ENOTEMPTY, "directory not empty"}, {EINVAL, "invalid argument"}, {ERANGE, "result too large"}, {EILSEQ, "illegal byte sequence"}, {EADDRINUSE, "address already in use"}, {EADDRNOTAVAIL, "address not available"}, {EAFNOSUPPORT, "address family not supported"}, {EALREADY, "connection already in progress"}, {EBADMSG, "bad message"}, {ECANCELED, "operation canceled"}, {ECONNABORTED, "connection aborted"}, {ECONNREFUSED, "connection refused"}, {ECONNRESET, "connection reset"}, {EDESTADDRREQ, "destination address required"}, {EHOSTUNREACH, "host is unreachable"}, {EIDRM, "identifier removed"}, {EINPROGRESS, "operation in progress"}, {EISCONN, "socket is connected"}, {ELOOP, "too many levels of symbolic links"}, {EMSGSIZE, "message too long"}, {ENETDOWN, "network is down"}, {ENETRESET, "connection aborted by network"}, {ENETUNREACH, "network unreachable"}, {ENOBUFS, "no buffer space available"}, {ENODATA, "no message is available"}, {ENOLINK, "link has been severed"}, {ENOMSG, "no message of the desired type"}, {ENOPROTOOPT, "protocol not available"}, {ENOSR, "no stream resources"}, {ENOSTR, "not a stream"}, {ENOTCONN, "the socket is not connected"}, {ENOTRECOVERABLE, "state not recoverable"}, {ENOTSOCK, "not a socket"}, {ENOTSUP, "operation not supported"}, {EOVERFLOW, "value too large too be stored in datatype"}, {EOWNERDEAD, "owner died"}, {EPROTO, "protocol error"}, {EPROTONOSUPPORT, "protocol not supported"}, {EPROTOTYPE, "protocol wrong type for socket"}, {ETIME, "timer expired"}, {ETIMEDOUT, "connection timed out"}, {ETXTBSY, "text file busy"}, {0, 0} };