GError#

Deprecated since version PyGObject-3.16.0: GObject.GError is deprecated; use GLib.GError instead

class GError(message: str = 'unknown error', domain: str = 'pygi-error', code: int = 0) None#

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 GError
matches(domain: str | int, code: int) bool#
Parameters:
  • domain

  • code

classmethod new_literal(domain: int, message: str, code: int) GError#
Parameters:
  • domain

  • message

  • code