Skip to content

Commit

Permalink
fix a few typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 25, 2016
1 parent eeb3c40 commit 49f334f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Changes
Expand Up @@ -2687,7 +2687,7 @@
from 0 to 0.025 seconds.

2.31 2011-11-21
- Improved stacktraces by making them a lot simpler.
- Improved stack traces by making them a lot simpler.

2.30 2011-11-20
- Deprecated Mojo::IOLoop::on_lock in favor of Mojo::IOLoop::lock.
Expand Down
12 changes: 6 additions & 6 deletions lib/Mojo/Exception.pm
Expand Up @@ -79,7 +79,7 @@ sub _detect {
my @trace;
while ($msg =~ /at\s+(.+?)\s+line\s+(\d+)/g) { unshift @trace, [$1, $2] }

# Extract file and line from stacktrace
# Extract file and line from stack trace
my $first = $self->frames->[0];
push @trace, [$first->[1], $first->[2]] if $first;

Expand Down Expand Up @@ -108,7 +108,7 @@ Mojo::Exception - Exceptions with context
use Mojo::Exception;
# Throw exception and show stacktrace
# Throw exception and show stack trace
eval { Mojo::Exception->throw('Died at test.pl line 3.') };
say $_->[1], ':', $_->[2] for @{$@->frames};
Expand All @@ -129,7 +129,7 @@ L<Mojo::Exception> implements the following attributes.
my $frames = $e->frames;
$e = $e->frames([$frame1, $frame2]);
Stacktrace.
Stack trace.
# Extract information from the last frame
my ($package, $filename, $line, $subroutine, $hasargs, $wantarray, $evaltext,
Expand Down Expand Up @@ -189,7 +189,7 @@ additional files if necessary.
Mojo::Exception->throw('Died at test.pl line 3.');
Mojo::Exception->throw('Died at test.pl line 3.', [$file1, $file2]);
Throw exception with stacktrace and extract context information from additional
Throw exception with stack trace and extract context information from additional
files if necessary.
=head2 to_string
Expand All @@ -206,9 +206,9 @@ Render exception.
$e = $e->trace;
$e = $e->trace($skip);
Store L</"frames">.
Generate stack trace and store all L</"frames">.
# Skip 3 call frames in stacktrace
# Skip 3 call frames in stack trace
$e->trace(3);
=head1 OPERATORS
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Template.pm
Expand Up @@ -91,14 +91,14 @@ sub compile {
my $compiled = eval $self->_wrap($code);
$self->compiled($compiled) and return undef unless $@;

# Use local stacktrace for compile exceptions
# Use local stack trace for compile exceptions
return Mojo::Exception->new($@, [$self->unparsed, $code])->trace->verbose(1);
}

sub interpret {
my $self = shift;

# Stacktrace
# Stack trace
local $SIG{__DIE__} = sub {
CORE::die($_[0]) if ref $_[0];
Mojo::Exception->throw(shift, [$self->unparsed, $self->code]);
Expand Down
2 changes: 1 addition & 1 deletion t/mojo/template.t
Expand Up @@ -595,7 +595,7 @@ $output = $mt->render(<<'EOF');
EOF
is $output, "Mojo::Template::SandBox\nworks!\n", 'right result';

# Unusable error message (stacktrace required)
# Unusable error message (stack trace required)
$mt = Mojo::Template->new;
$output = $mt->render(<<'EOF');
test
Expand Down

0 comments on commit 49f334f

Please sign in to comment.