Class (GI Struct)

Gtk-3.0GtkBuilderError

Error codes that identify various errors that can occur while using Gtk.Builder.

Hierarchy (View Summary)

Index

Constructors

Properties

$gtype: GType<GLib.Error>
DUPLICATE_ID: number

An object id occurred twice.

INVALID_ATTRIBUTE: number

Gtk.Builder found an attribute that it doesn’t understand.

INVALID_ID: number

An object id is unknown

INVALID_PROPERTY: number

The specified property is unknown for the object class.

INVALID_SIGNAL: number

The specified signal is unknown for the object class.

INVALID_TAG: number

Gtk.Builder found a tag that it doesn’t understand.

INVALID_TYPE_FUNCTION: number

A type-func attribute didn’t name a function that returns a GObject.GType.

INVALID_VALUE: number

Gtk.Builder couldn’t parse some attribute value.

MISSING_ATTRIBUTE: number

An attribute that is required by Gtk.Builder was missing.

MISSING_PROPERTY_VALUE: number

A required property value was missing.

OBJECT_TYPE_REFUSED: number

A specified object type is of the same type or derived from the type of the composite class being extended with builder XML.

TEMPLATE_MISMATCH: number

The wrong type was specified in a composite class’s template XML

UNHANDLED_TAG: number

The input contained a tag that Gtk.Builder can’t handle.

VERSION_MISMATCH: number

The input file requires a newer version of GTK+.

Properties - Inherited from GLib

code: number
domain: number
message: string
stack: string

Methods

Methods - Inherited from GLib

  • 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 | (new (...args: any[]) => GLib.Error)

      an error domain

    • code: number

      an error code

    Returns boolean

    whether error has domain and code

  • This function registers an extended GLib.Error domain. error_type_name will be duplicated. Otherwise does the same as g_error_domain_register_static().

    Parameters

    • error_type_name: string

      string to create a GLib.Quark from

    • error_type_private_size: number

      size of the private error data in bytes

    • error_type_init: ErrorInitFunc

      function initializing fields of the private error data

    • error_type_copy: ErrorCopyFunc

      function copying fields of the private error data

    • error_type_clear: ErrorClearFunc

      function freeing fields of the private error data

    Returns number

  • This function registers an extended GLib.Error domain.

    error_type_name should not be freed. error_type_private_size must be greater than 0.

    error_type_init receives an initialized GLib.Error and should then initialize the private data.

    error_type_copy is a function that receives both original and a copy GLib.Error and should copy the fields of the private error data. The standard GLib.Error fields are already handled.

    error_type_clear receives the pointer to the error, and it should free the fields of the private error data. It should not free the struct itself though.

    Normally, it is better to use G_DEFINE_EXTENDED_ERROR(), as it already takes care of passing valid information to this function.

    Parameters

    • error_type_name: string

      static string to create a GLib.Quark from

    • error_type_private_size: number

      size of the private error data in bytes

    • error_type_init: ErrorInitFunc

      function initializing fields of the private error data

    • error_type_copy: ErrorCopyFunc

      function copying fields of the private error data

    • error_type_clear: ErrorClearFunc

      function freeing fields of the private error data

    Returns number