summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2010-06-16 22:28:35 -0400
committerJason Woodward2010-06-16 22:28:35 -0400
commitbe2162cb9155d013bc45d0363b34ce67bf6e5220 (patch)
tree9dc45a01e0a79ac3d5348030839344e25143e5f5
parent07742f494f3d0fe367bac573c073ae7dcf7f657a (diff)
downloadJaos-WebApp-be2162cb9155d013bc45d0363b34ce67bf6e5220.tar.gz
updated error reporting when loading packages or dispatching
-rw-r--r--Changes3
-rw-r--r--lib/Jaos/WebApp.pm10
2 files changed, 7 insertions, 6 deletions
diff --git a/Changes b/Changes
index 3678310..7b6077a 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,6 @@
-0.3 June 13, 2010
+0.3 June 16, 2010
+ * updated error reporting when loading packages or dispatching
* added alias for req->upload to ::Controller
* encode render output
* run post post_dispatch hooks in reverse order
diff --git a/lib/Jaos/WebApp.pm b/lib/Jaos/WebApp.pm
index 2c32370..096f4ff 100644
--- a/lib/Jaos/WebApp.pm
+++ b/lib/Jaos/WebApp.pm
@@ -35,12 +35,12 @@ sub new
File::Find::Rule->file()->name('*.pm')
->in($path . $class);
for my $m (@submods) {
- eval "require $m" or die $!;
+ eval "require $m" or die "Failed to load $m: $!";
}
};
if ($@) {
- $self->log->error("$!");
- return $self->internal_server_error("$@\n$!");
+ $self->log->error("$@");
+ return $self->internal_server_error("$@");
}
@@ -94,8 +94,8 @@ sub run
}
};
if ($@) {
- $self->log->error("dispatch error: $!");
- $self->internal_server_error("$@:$!", $req, $res);
+ $self->log->error("dispatch error: $@");
+ $self->internal_server_error("$@", $req, $res);
}
# post dispatch hook here