Class (GI Struct)

Flatpak-1.0FlatpakError

Error codes for library functions.

Hierarchy (View Summary)

Index

Constructors

Properties

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

The transaction was aborted (returned true in operation-error signal).

ALREADY_INSTALLED: number

App/runtime/remote is already installed

AUTHENTICATION_FAILED: number

An authentication operation failed, for example, no correct password was supplied. (Since: 1.7.3)

DIFFERENT_REMOTE: number

The App/Runtime is already installed, but from a different remote.

DOWNGRADE: number

The pulled commit is a downgrade, and a downgrade wasn't specifically allowed. (Since: 1.0)

EXPORT_FAILED: number

Exporting data failed. (Since: 1.0.3)

INVALID_DATA: number

Invalid data. (Since: 1.0.3)

INVALID_NAME: number

Application, runtime or remote name is invalid. (Since: 1.0.3)

INVALID_REF: number

A ref could not be parsed. (Since: 1.0.3)

NEED_NEW_FLATPAK: number

The App/Runtime needs a more recent version of flatpak.

NOT_AUTHORIZED: number

An operation tried to access a ref, or information about it that it was not authorized. For example, when succesfully authenticating with a server but the user doesn't have permissions for a private ref. (Since: 1.7.3)

NOT_CACHED: number

Cached data was requested, but it was not available. (Since: 1.4.0)

NOT_INSTALLED: number

App/runtime is not installed

ONLY_PULLED: number

App/runtime was only pulled into the local repository but not installed.

OUT_OF_SPACE: number

More disk space needed. (Since: 1.2.0)

PERMISSION_DENIED: number

An operation was not allowed by the administrative policy. For example, an app is not allowed to be installed due to not complying with the parental controls policy. (Since: 1.5.1)

REF_NOT_FOUND: number

The specified ref was not found. (Since: 1.4.0)

REMOTE_NOT_FOUND: number

The specified remote was not found.

REMOTE_USED: number

Remote can't be uninstalled. (Since: 1.0.3)

RUNTIME_NOT_FOUND: number

A runtime needed for the app was not found.

RUNTIME_USED: number

Runtime can't be uninstalled. (Since: 1.0.3)

SETUP_FAILED: number

Sandbox setup failed. (Since: 1.0.3)

SKIPPED: number

The App/Runtime install was skipped due to earlier errors.

UNTRUSTED: number

Missing GPG key or signature. (Since: 1.0.3)

WRONG_USER: number

An operation is being attempted by the wrong user (such as root operating on a user installation). (Since: 1.2.0)

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