Unicode plugin - rework exception handler
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Plugin / Unicode / Encoding.pm
index ffcdfae..402087e 100644 (file)
@@ -125,7 +125,7 @@ sub setup {
     my $conf = $self->config;
 
     # Allow an explict undef encoding to disable default of utf-8
-    my $enc = exists $conf->{encoding} ? delete $conf->{encoding} : 'UTF-8';
+    my $enc = delete $conf->{encoding};
     $self->encoding( $enc );
 
     return $self->next::method(@_);
@@ -172,7 +172,8 @@ sub _handle_param_unicode_decoding {
 
 sub handle_unicode_encoding_exception {
     my ( $self, $exception_ctx ) = @_;
-    die $exception_ctx->{error_msg};
+    $self->log->warn($exception_ctx->{error_msg});
+    return $exception_ctx->{'param_value'};
 }
 
 1;