Class (GI Struct)

Rest-1.0RestProxyError

Error domain used when returning errors from a Rest.Proxy.

Hierarchy (View Summary)

Index

Constructors

Properties

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

URL requires binding

CANCELLED: number

Cancelled

CONNECTION: number

Connection

FAILED: number

Failure

HTTP_BAD_GATEWAY: number

HTTP/Bad gateway

HTTP_BAD_REQUEST: number

HTTP/Bad request

HTTP_CONFLICT: number

HTTP/Conflict

HTTP_EXPECTATION_FAILED: number

HTTP/Expectation failed

HTTP_FORBIDDEN: number

HTTP/Forbidden

HTTP_FOUND: number

HTTP/Found

HTTP_FOUROHTWO: number

HTTP/402

HTTP_GATEWAY_TIMEOUT: number

HTTP/Gateway timeout

HTTP_GONE: number

HTTP/Gone

HTTP_HTTP_VERSION_NOT_SUPPORTED: number

HTTP/Version not supported

HTTP_INTERNAL_SERVER_ERROR: number

HTTP/Internal server error

HTTP_LENGTH_REQUIRED: number

HTTP/Length required

HTTP_METHOD_NOT_ALLOWED: number

HTTP/Method not allowed

HTTP_MOVED_PERMANENTLY: number

HTTP/Moved permanently

HTTP_MULTIPLE_CHOICES: number

HTTP/Multiple choices

HTTP_NOT_ACCEPTABLE: number

HTTP/Not acceptable

HTTP_NOT_FOUND: number

HTTP/Not found

HTTP_NOT_IMPLEMENTED: number

HTTP/Not implemented

HTTP_NOT_MODIFIED: number

HTTP/Not modified

HTTP_PRECONDITION_FAILED: number

HTTP/Precondition failed

HTTP_PROXY_AUTHENTICATION_REQUIRED: number

HTTP/Proxy authentication required

HTTP_REQUEST_ENTITY_TOO_LARGE: number

HTTP/Request entity too large

HTTP_REQUEST_TIMEOUT: number

HTTP/Request timeout

HTTP_REQUEST_URI_TOO_LONG: number

HTTP/Request URI too long

HTTP_REQUESTED_RANGE_NOT_SATISFIABLE: number

HTTP/Requested range not satisfiable

HTTP_SEE_OTHER: number

HTTP/See other

HTTP_SERVICE_UNAVAILABLE: number

HTTP/Service unavailable

HTTP_TEMPORARY_REDIRECT: number

HTTP/Temporary redirect

HTTP_THREEOHSIX: number

HTTP/306

HTTP_UNAUTHORIZED: number

HTTP/Unauthorized

HTTP_UNSUPPORTED_MEDIA_TYPE: number

HTTP/Unsupported media type

HTTP_USE_PROXY: number

HTTP/Use proxy

IO: number

Input/Output

RESOLUTION: number

Resolution

SSL: number

SSL

URL_INVALID: number

Invalid URL

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