glibmm 2.80.0
|
Exception class for giomm errors. More...
#include <giomm/error.h>
Public Types | |
enum | Code { FAILED , NOT_FOUND , EXISTS , IS_DIRECTORY , NOT_DIRECTORY , NOT_EMPTY , NOT_REGULAR_FILE , NOT_SYMBOLIC_LINK , NOT_MOUNTABLE_FILE , FILENAME_TOO_LONG , INVALID_FILENAME , TOO_MANY_LINKS , NO_SPACE , INVALID_ARGUMENT , PERMISSION_DENIED , NOT_SUPPORTED , NOT_MOUNTED , ALREADY_MOUNTED , CLOSED , CANCELLED , PENDING , READ_ONLY , CANT_CREATE_BACKUP , WRONG_ETAG , TIMED_OUT , WOULD_RECURSE , BUSY , WOULD_BLOCK , HOST_NOT_FOUND , HOST_WAS_NOT_FOUND = HOST_NOT_FOUND , WOULD_MERGE , FAILED_HANDLED , TOO_MANY_OPEN_FILES , NOT_INITIALIZED , ADDRESS_IN_USE , PARTIAL_INPUT , INVALID_DATA , DBUS_ERROR , HOST_UNREACHABLE , NETWORK_UNREACHABLE , CONNECTION_REFUSED , PROXY_FAILED , PROXY_AUTH_FAILED , PROXY_NEED_AUTH , PROXY_NOT_ALLOWED , BROKEN_PIPE , CONNECTION_CLOSED = BROKEN_PIPE , NOT_CONNECTED , MESSAGE_TOO_LARGE , NO_SUCH_DEVICE , DESTINATION_UNSET } |
Error codes returned by GIO functions. More... | |
Public Member Functions | |
Error (Code error_code, const Glib::ustring &error_message) | |
Error (GError *gobject) | |
Code | code () const |
Public Member Functions inherited from Glib::Error | |
Error () | |
Error (GQuark error_domain, int error_code, const Glib::ustring & message) | |
Error (GError *gobject, bool take_copy=false) | |
Error (const Error &other) | |
Error & | operator= (const Error &other) |
~Error () noexcept override | |
operator bool () const | |
Test whether the Error has an underlying instance. | |
GQuark | domain () const |
int | code () const |
const char * | what () const noexcept override |
bool | matches (GQuark error_domain, int error_code) const |
GError * | gobj () |
const GError * | gobj () const |
Additional Inherited Members | |
Protected Attributes inherited from Glib::Error | |
GError * | gobject_ |
Exception class for giomm errors.
Error codes returned by GIO functions.
Note that this domain may be extended in future GLib releases. In general, new error codes either only apply to new APIs, or else replace Gio::Error::FAILED in cases that were not explicitly distinguished before. You should therefore avoid writing code like
[C example ellipted] but should instead treat all unrecognized error codes the same as Gio::Error::FAILED.
See also PollableReturn for a cheaper way of returning Gio::Error::WOULD_BLOCK to callers without allocating a Error.
Enumerator | |
---|---|
FAILED | Generic error condition for when an operation fails and no more specific Gio::Error value is defined. |
NOT_FOUND | File not found. |
EXISTS | File already exists. |
IS_DIRECTORY | File is a directory. |
NOT_DIRECTORY | File is not a directory. |
NOT_EMPTY | File is a directory that isn't empty. |
NOT_REGULAR_FILE | File is not a regular file. |
NOT_SYMBOLIC_LINK | File is not a symbolic link. |
NOT_MOUNTABLE_FILE | File cannot be mounted. |
FILENAME_TOO_LONG | Filename is too many characters. |
INVALID_FILENAME | Filename is invalid or contains invalid characters. |
TOO_MANY_LINKS | File contains too many symbolic links. |
NO_SPACE | No space left on drive. |
INVALID_ARGUMENT | Invalid argument. |
PERMISSION_DENIED | Permission denied. |
NOT_SUPPORTED | Operation (or one of its parameters) not supported. |
NOT_MOUNTED | File isn't mounted. |
ALREADY_MOUNTED | File is already mounted. |
CLOSED | File was closed. |
CANCELLED | Operation was cancelled. See Cancellable. |
PENDING | Operations are still pending. |
READ_ONLY | File is read only. |
CANT_CREATE_BACKUP | Backup couldn't be created. |
WRONG_ETAG | File's Entity Tag was incorrect. |
TIMED_OUT | Operation timed out. |
WOULD_RECURSE | Operation would be recursive. |
BUSY | File is busy. |
WOULD_BLOCK | Operation would block. |
HOST_NOT_FOUND | Host couldn't be found (remote operations). |
HOST_WAS_NOT_FOUND | |
WOULD_MERGE | Operation would merge files. |
FAILED_HANDLED | Operation failed and a helper program has already interacted with the user. Do not display any error dialog. |
TOO_MANY_OPEN_FILES | The current process has too many files open and can't open any more. Duplicate descriptors do count toward this limit. |
NOT_INITIALIZED | The object has not been initialized. |
ADDRESS_IN_USE | The requested address is already in use. |
PARTIAL_INPUT | Need more input to finish operation. |
INVALID_DATA | The input data was invalid. |
DBUS_ERROR | A remote object generated an error that doesn't correspond to a locally registered Error error domain. Use g_dbus_error_get_remote_error() to extract the D-Bus error name and g_dbus_error_strip_remote_error() to fix up the message so it matches what was received on the wire. |
HOST_UNREACHABLE | Host unreachable. |
NETWORK_UNREACHABLE | Network unreachable. |
CONNECTION_REFUSED | Connection refused. |
PROXY_FAILED | Connection to proxy server failed. |
PROXY_AUTH_FAILED | Proxy authentication failed. |
PROXY_NEED_AUTH | Proxy server needs authentication. |
PROXY_NOT_ALLOWED | Proxy connection is not allowed by ruleset. |
BROKEN_PIPE | Broken pipe. |
CONNECTION_CLOSED | Connection closed by peer. Note that this is the same code as Gio::Error::BROKEN_PIPE; before 2.44 some "connection closed" errors returned Gio::Error::BROKEN_PIPE, but others returned Gio::Error::FAILED. Now they should all return the same value, which has this more logical name. |
NOT_CONNECTED | Transport endpoint is not connected. |
MESSAGE_TOO_LARGE | Message too large. |
NO_SUCH_DEVICE | No such device found. |
DESTINATION_UNSET | Destination address unset. |
Gio::Error::Error | ( | Code | error_code, |
const Glib::ustring & | error_message | ||
) |
|
explicit |
Code Gio::Error::code | ( | ) | const |