Error#
The Error structure contains information about an error that has occurred.
Attributes#
- class Error
- domain#
The error domain, usually a string that you can convert to a GLib quark with
quark_from_string().
- code#
A numeric code that identifies a specific error within the domain.
- message#
A human-readable description of the error.
Methods#
- class Error
- matches(domain: str | int, code: int) bool#
Returns
Trueiferrormatchesdomainandcode,Falseotherwise. In particular, whenerrorisNone,Falsewill be returned.If
domaincontains aFAILED(or otherwise generic) error code, you should generally not check for it explicitly, but should instead treat any not-explicitly-recognized error code as being equivalent to theFAILEDcode. This way, if the domain is extended in the future to provide a more specific error code for a certain case, your code will still work.- Parameters:
domain – an error domain
code – an error code