From 553fdb884cce03af05426a87ee588a335d76bf2b Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 12 Jun 2022 19:33:53 -0700 Subject: [PATCH] Plugin/Plang: do not use output_value() on exceptions --- lib/PBot/Plugin/Plang.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/PBot/Plugin/Plang.pm b/lib/PBot/Plugin/Plang.pm index 9faefcaf..47b665e3 100644 --- a/lib/PBot/Plugin/Plang.pm +++ b/lib/PBot/Plugin/Plang.pm @@ -105,7 +105,7 @@ sub cmd_plang { $self->{output} = ""; # collect output of the embedded Plang program eval { - my $result = $self->{plang}->interpret_string($context->{arguments}); + my $result = $self->{plang}->interpret_string($context->{arguments}); # check to see if we need to append final result to output if (defined $result->[1]) { @@ -114,7 +114,6 @@ sub cmd_plang { }; if (my $exception = $@) { - $exception = $self->{plang}->{interpreter}->output_value($exception); $self->{output} .= $exception; }