From 3f5a11e6085e0f36dabffecd50ccb77a6fba99f4 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 18 Jan 2022 13:42:06 -0800 Subject: [PATCH] Plugin/Plang: fix run-time unhandled exception error reporting --- lib/PBot/Plugin/Plang.pm | 3 ++- lib/PBot/VERSION.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/PBot/Plugin/Plang.pm b/lib/PBot/Plugin/Plang.pm index b002648d..9faefcaf 100644 --- a/lib/PBot/Plugin/Plang.pm +++ b/lib/PBot/Plugin/Plang.pm @@ -93,6 +93,7 @@ sub unload { my $self = shift; $self->{pbot}->{commands}->unregister('plang'); $self->{pbot}->{commands}->unregister('plangrepl'); + delete $INC{"Plang/Interpreter.pm"}; } sub cmd_plang { @@ -114,7 +115,7 @@ sub cmd_plang { if (my $exception = $@) { $exception = $self->{plang}->{interpreter}->output_value($exception); - $self->{output} .= "Run-time error: unhandled exception: $exception"; + $self->{output} .= $exception; } # return the output diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index a6bddc34..5b73d02b 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4443, + BUILD_REVISION => 4444, BUILD_DATE => "2022-01-18", };