Error
- class Error(message='unknown error', domain='pygi-error', code=0)
The GError
structure contains information about
an error that has occurred.
Methods
- class Error
- matches(domain, code)
Returns
True
iferror
matchesdomain
andcode
,False
otherwise. In particular, whenerror
isNone
,False
will be returned.If
domain
contains 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 theFAILED
code. 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
- classmethod new_literal(message, code)
- Parameters:
message
code