Gjsify LogoGjsify Logo

The GError structure contains information about an error that has occurred.

record

Hierarchy

  • Error

Index

Constructors

Properties

code: number

error code, e.g. %G_FILE_ERROR_NOENT

field
domain: number

error domain, e.g. %G_FILE_ERROR

field
message: string

human-readable informative error message

field
name: string

Methods

  • free(): void
  • matches(domain: number, code: number): boolean
  • Returns %TRUE if error matches domain and code, %FALSE otherwise. In particular, when error is %NULL, %FALSE will be returned.

    If domain contains a FAILED (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 the FAILED 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: number

      an error domain

    • code: number

      an error code

    Returns boolean

  • newLiteral(domain: number, code: number, message: string): GLib.Error
  • Creates a new #GError; unlike g_error_new(), message is not a printf()-style format string. Use this function if message contains text you don't have control over, that could include printf() escape sequences.

    Parameters

    • domain: number

      error domain

    • code: number

      error code

    • message: string

      error message

    Returns GLib.Error

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method