diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-05-29 01:34:06 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-05-29 01:34:06 -0500 |
commit | 1ce2f2c8f0c44f345fe83a43de91fc094e5a8260 (patch) | |
tree | 7188b1de783c5c175eba0080b95ff5eecc64f51b /lib/App/REPL/Plugin/Defaults.pm | |
parent | 3b4c8e20ecc690836ff7f7ea7889bbcd43b3d3e8 (diff) | |
download | reply-1ce2f2c8f0c44f345fe83a43de91fc094e5a8260.tar.gz reply-1ce2f2c8f0c44f345fe83a43de91fc094e5a8260.zip |
handle exceptions
Diffstat (limited to 'lib/App/REPL/Plugin/Defaults.pm')
-rw-r--r-- | lib/App/REPL/Plugin/Defaults.pm | 8 |
1 files changed, 8 insertions, 0 deletions
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) = @_; |