mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Throw assertion errors which will be sent to sentry
This commit is contained in:
parent
de79289b70
commit
2fd7409804
1 changed files with 15 additions and 3 deletions
|
|
@ -247,7 +247,11 @@ class StockItemBarcodeAssignmentHandler extends BarcodeHandler {
|
||||||
|
|
||||||
final InvenTreeStockItem item;
|
final InvenTreeStockItem item;
|
||||||
|
|
||||||
StockItemBarcodeAssignmentHandler(this.item);
|
StockItemBarcodeAssignmentHandler(this.item) {
|
||||||
|
if (item == null) {
|
||||||
|
throw new AssertionError("null StockItem passed to barcode handler");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String getOverlayText(BuildContext context) => L10().barcodeScanAssign;
|
String getOverlayText(BuildContext context) => L10().barcodeScanAssign;
|
||||||
|
|
@ -322,7 +326,11 @@ class StockItemScanIntoLocationHandler extends BarcodeHandler {
|
||||||
|
|
||||||
final InvenTreeStockItem item;
|
final InvenTreeStockItem item;
|
||||||
|
|
||||||
StockItemScanIntoLocationHandler(this.item);
|
StockItemScanIntoLocationHandler(this.item) {
|
||||||
|
if (item == null) {
|
||||||
|
throw new AssertionError("null StockItem passed to StockItemScanIntoLocationHandler");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String getOverlayText(BuildContext context) => L10().barcodeScanLocation;
|
String getOverlayText(BuildContext context) => L10().barcodeScanLocation;
|
||||||
|
|
@ -378,7 +386,11 @@ class StockLocationScanInItemsHandler extends BarcodeHandler {
|
||||||
|
|
||||||
final InvenTreeStockLocation location;
|
final InvenTreeStockLocation location;
|
||||||
|
|
||||||
StockLocationScanInItemsHandler(this.location);
|
StockLocationScanInItemsHandler(this.location) {
|
||||||
|
if (location == null) {
|
||||||
|
throw new AssertionError("null StockLocation passed to StockLocationScanInItemsHandler");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String getOverlayText(BuildContext context) => L10().barcodeScanItem;
|
String getOverlayText(BuildContext context) => L10().barcodeScanItem;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue