Skip to content

Commit

Permalink
add type attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Sukrieh authored and Alexis Sukrieh committed Dec 26, 2011
1 parent 5ed3093 commit b8ca7d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Dancer/Core/Error.pm
Expand Up @@ -21,6 +21,12 @@ has charset => (
default => sub { 'UTF-8' },
);

has type => (
is => 'ro',
isa => sub { Str(@_) },
default => sub { 'Runtime Error' },
);

has title => (
is => 'rw',
isa => sub { Str(@_) },
Expand Down Expand Up @@ -82,7 +88,7 @@ has message => (

sub _build_message {
my ($self) = @_;
my $html_output = "<h2>" . $self->{type} . "</h2>";
my $html_output = "<h2>" . $self->type . "</h2>";
$html_output .= $self->backtrace;
$html_output .= $self->environment;
return $html_output;
Expand Down

0 comments on commit b8ca7d5

Please sign in to comment.