From c9ef624d8210f6a56971070cffff5c1fca04c46d Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Sun, 12 Jun 2022 22:49:33 +0200 Subject: [PATCH] Update error message --- lib/RevBank/Global.pm | 2 +- plugins/withdraw | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/RevBank/Global.pm b/lib/RevBank/Global.pm index f637904..f2eb52e 100644 --- a/lib/RevBank/Global.pm +++ b/lib/RevBank/Global.pm @@ -28,7 +28,7 @@ sub import { die "For our sanity, no negative amounts, please :).\n"; } if ($amount->cents > 99900) { - die "That's way too much money, or an unknown barcode.\n"; + die "That's way too much money.\n"; } return $amount; }; diff --git a/plugins/withdraw b/plugins/withdraw index f1bc9b3..a1aa403 100644 --- a/plugins/withdraw +++ b/plugins/withdraw @@ -3,7 +3,7 @@ HELP1 "withdraw " => "Withdraw from your account"; sub command :Tab(withdraw) ($self, $cart, $command, @) { - if (defined parse_amount($command)) { + if (defined eval { parse_amount($command) }) { warn "Note: raw amounts for withdrawal or unlisted products are no longer supported.\n\n"; warn "Please use the 'withdraw' command to take money out of your revbank account, or\n"; warn "the 'unlisted' command to pay for an unlisted product.\n\n";