# get abstract method

Asset get([

1. Supplier<Exception>? throwIfNotFound

])

Retrieves the asset represented by this resource.

- If the asset does not exist and `throwIfNotFound` is provided, the supplied exception will be thrown.
- If `throwIfNotFound` is not provided, a generic exception may be thrown.

### Example

    try {
      final asset = resource.get(() => Exception("Missing resource"));
      print("Loaded: $asset");
    } catch (e) {
      print("Failed to load asset: $e");
    }

## Implementation

    Asset get([Supplier<Exception>? throwIfNotFound]);