diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b1b7db..5b5b0f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.1.0-alpha.17 +- Debug informace v `objednatZBurzy` ## 0.1.0-alpha.16 - Opravit zobrazení zda-li jde jídlo objednat, když není objednané žádné jídlo ## 0.1.0-alpha.15 diff --git a/lib/src/canteen.dart b/lib/src/canteen.dart index 3313675..2c56e82 100644 --- a/lib/src/canteen.dart +++ b/lib/src/canteen.dart @@ -460,13 +460,13 @@ class Canteen { /// - `b` - Jídlo __z burzy__, které chceme objednat | [Burza] /// /// Výstup: - /// - [bool], `true`, pokud bylo jídlo úspěšně objednáno z burzy, jinak `false` + /// - [bool], `true`, pokud bylo jídlo úspěšně objednáno z burzy, jinak `Exception` Future objednatZBurzy(Burza b) async { if (!prihlasen) return Future.error("Uživatel není přihlášen"); try { await _getRequest("/faces/secured/" + b.url!); } catch (e) { - return false; + return Future.error(e.toString()); } return true; } diff --git a/pubspec.yaml b/pubspec.yaml index d0cc1f5..45f743c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: canteenlib description: Library for communication with the czech canteen food ordering system iCanteen -version: 0.1.0-alpha.16 +version: 0.1.0-alpha.17 repository: 'https://github.com/hernikplays/canteenlib' issue_tracker: 'https://github.com/hernikplays/canteenlib/issues' documentation: 'https://docs.hernikplays.cz'