Dex.Future.catch
Description: Reference for Dex.Future.catch

### Constructor

# Dex Futurecatch

#### Declaration [src]

    DexFuture*
    dex_future_catch (
      DexFuture* future,
      DexFutureCallback callback,
      gpointer callback_data,
      GDestroyNotify callback_data_destroy
    )

#### Description [src]

Calls `callback` when `future` rejects.

If `future` resolves, then `callback` will not be called.

#### Parameters

`future`

  Type: `DexFuture`

  A `DexFuture`.

  The called function takes ownership of the data, and is responsible for freeing it.

`callback`

  Type: `DexFutureCallback`

  A callback to execute.

`callback_data`

  Type: `gpointer`

  Closure data for `callback`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`callback_data_destroy`

  Type: `GDestroyNotify`

  Destroy notify for `callback_data`.

#### Return value

Type: `DexFuture`

A `DexFuture`.

The caller of the function takes ownership of the data, and is responsible for freeing it.