AssetLoaderException constructor

AssetLoaderException(
  1. String message,
  2. String assetPath, {
  3. Object? cause,
})

An exception thrown when an asset cannot be loaded by the JetLeaf bundler.

This exception typically occurs when trying to read or resolve a file that does not exist, is inaccessible, or fails during the bundling process.

The assetPath provides the full relative or absolute path of the asset that failed to load, and the optional cause can point to the underlying exception that triggered the failure.

Example usage:

throw AssetLoaderException('Failed to load template', 'templates/home.html');
  • message: A human-readable error message describing the failure.
  • assetPath: The relative or absolute path of the asset.
  • cause: (Optional) The underlying cause of the error.

Implementation

AssetLoaderException(super.message, this.assetPath, {super.cause});