-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: throw exception when an item isn't found by
searchByUniqueName
- Loading branch information
1 parent
ed9dddd
commit 7636195
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/// {@template item_not_found} | ||
/// Item exceptions thrown when an item was not found. | ||
/// {@endtemplate} | ||
class ItemNotFound implements Exception { | ||
/// {@macro item_not_found} | ||
const ItemNotFound(this.item); | ||
|
||
/// Item name or uniqueName. | ||
final String item; | ||
|
||
@override | ||
String toString() => '$item was not found.'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export 'exceptions.dart'; | ||
export 'item_categories.dart'; | ||
export 'items_utils.dart'; |