aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoffix Znet <zoffixznet@users.noreply.github.com>2018-02-06 14:17:44 -0500
committerGitHub <noreply@github.com>2018-02-06 14:17:44 -0500
commit6e72e44dcfa6705a8931f7918bd617536fa380f3 (patch)
tree9667d5b648e5ecdb706a23d757dc8aedc9b38fab
parente27c8e2f7fb25560679c4005d214ccec6a434369 (diff)
Ensure we don't try to serialize an Exception in $!
-rw-r--r--lib/IRC/Client.pm61
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/IRC/Client.pm6 b/lib/IRC/Client.pm6
index 3658d73..7dd6e8d 100644
--- a/lib/IRC/Client.pm6
+++ b/lib/IRC/Client.pm6
@@ -25,6 +25,7 @@ has Channel $!socket-pipe = Channel.new;
my &colored = (try require Terminal::ANSIColor) === Nil
&& sub (Str $s, $) { $s } ||
::('Terminal::ANSIColor::EXPORT::DEFAULT::&colored');
+$! = Nil; # don't serialize any exceptions from the above
submethod BUILD (
Int:D :$!debug = 0,