3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-25 21:39:27 +01:00

Plugin/Plang: fix run-time unhandled exception error reporting

This commit is contained in:
Pragmatic Software 2022-01-18 13:42:06 -08:00
parent 02a600fa32
commit 3f5a11e608
2 changed files with 3 additions and 2 deletions

View File

@ -93,6 +93,7 @@ sub unload {
my $self = shift; my $self = shift;
$self->{pbot}->{commands}->unregister('plang'); $self->{pbot}->{commands}->unregister('plang');
$self->{pbot}->{commands}->unregister('plangrepl'); $self->{pbot}->{commands}->unregister('plangrepl');
delete $INC{"Plang/Interpreter.pm"};
} }
sub cmd_plang { sub cmd_plang {
@ -114,7 +115,7 @@ sub cmd_plang {
if (my $exception = $@) { if (my $exception = $@) {
$exception = $self->{plang}->{interpreter}->output_value($exception); $exception = $self->{plang}->{interpreter}->output_value($exception);
$self->{output} .= "Run-time error: unhandled exception: $exception"; $self->{output} .= $exception;
} }
# return the output # return the output

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script # These are set by the /misc/update_version script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 4443, BUILD_REVISION => 4444,
BUILD_DATE => "2022-01-18", BUILD_DATE => "2022-01-18",
}; };