Skip to content

Commit

Permalink
Add program execution results to show halting
Browse files Browse the repository at this point in the history
  • Loading branch information
genio committed Sep 5, 2016
1 parent dfe801c commit 1fce805
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ unexpectedly. Let's start with a simple example.
return $int+1;
}

This will result in the following output:

$ perl increment.pl
0 plus 1 = 1
That's not an int! at foo.pl line 11.

The first line prints `0 plus 1 = 1\n` as expected. The second line, however,
dies in a way that we can't recover from which prevents the rest of our program
from doing any further execution. So, we must handle our exceptions!
Expand Down
6 changes: 6 additions & 0 deletions lib/Exceptions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ unexpectedly. Let's start with a simple example.
return $int+1;
}
This will result in the following output:
$ perl increment.pl
0 plus 1 = 1
That's not an int! at foo.pl line 11.
The first line prints C<0 plus 1 = 1\n> as expected. The second line, however,
dies in a way that we can't recover from which prevents the rest of our program
from doing any further execution. So, we must handle our exceptions!
Expand Down

0 comments on commit 1fce805

Please sign in to comment.