From 1ce2f2c8f0c44f345fe83a43de91fc094e5a8260 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 29 May 2013 01:34:06 -0500 Subject: handle exceptions --- lib/App/REPL/Plugin/Defaults.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/App/REPL/Plugin/Defaults.pm') diff --git a/lib/App/REPL/Plugin/Defaults.pm b/lib/App/REPL/Plugin/Defaults.pm index f2b4705..28eb346 100644 --- a/lib/App/REPL/Plugin/Defaults.pm +++ b/lib/App/REPL/Plugin/Defaults.pm @@ -23,6 +23,14 @@ sub evaluate { return eval $line; } +sub print_error { + my $self = shift; + my ($next, $error) = @_; + + print $error, "\n" + if defined $error; +} + sub print_result { my $self = shift; my ($next, $result) = @_; -- cgit v1.2.3-54-g00ecf