diff --git a/lib/LDV/Imgbin.pm b/lib/LDV/Imgbin.pm index 9cda2c4..114eb74 100644 --- a/lib/LDV/Imgbin.pm +++ b/lib/LDV/Imgbin.pm @@ -87,7 +87,7 @@ sub save { ); my $image = Imager->new(file => $upload->asset->path) - or die Imager->errstr(); + or die(Imager->errstr() . "\n"); my $json = { comment => $image->tags(name => 'i_comment') // '', @@ -111,6 +111,8 @@ sub save { $self->redirect_to("/imgbin/$time"); } or do { + $self->app->log->error($@); + $@ =~ s/\s+ at \s+ .+ \s+ line \s+ \d+//oxi; $self->flash(error => $@); $self->redirect_to('/imgbin'); };