Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add diagnostics on JSON failures

  • Loading branch information...
commit a84814b8e1376ac51b93cda6d6188a40c6066205 1 parent 98460b0
@dagolden dagolden authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/Metabase/Report.pm
View
4 lib/Metabase/Report.pm
@@ -124,7 +124,9 @@ sub content_as_bytes {
Carp::confess("can't serialize an open report") unless $self->{__closed};
my $content = [ map { $_->as_struct } @{ $self->content } ];
- JSON->new->encode( $content );
+ my $encoded = eval { JSON->new->encode( $content ) };
+ Carp::confess $@ if $@;
+ return $encoded;
}
sub content_from_bytes {
Please sign in to comment.
Something went wrong with that request. Please try again.