blob: 9ebca8e608ab57273230922ffd5d3fe3334d64d3 [file] [log] [blame]
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library barback.errors;
import 'dart:async';
import 'dart:io';
import 'asset_id.dart';
/// Error thrown when an asset with [id] cannot be found.
class AssetNotFoundException implements Exception {
final AssetId id;
AssetNotFoundException(this.id);
String toString() => "Could not find asset $id.";
}
/// Error thrown when two transformers both output an asset with [id].
class AssetCollisionException implements Exception {
final AssetId id;
AssetCollisionException(this.id);
String toString() => "Got collision on asset $id.";
}
/// Error thrown when a transformer requests an input [id] which cannot be
/// found.
class MissingInputException implements Exception {
final AssetId id;
MissingInputException(this.id);
String toString() => "Missing input $id.";
}
/// Error thrown when a transformer outputs an asset with the wrong package
/// name.
class InvalidOutputException implements Exception {
final String package;
final AssetId id;
InvalidOutputException(this.package, this.id);
String toString() => "Invalid output $id: must be in package $package.";
}