Skip to content

Commit

Permalink
glyphinator: restart on malformed json error
Browse files Browse the repository at this point in the history
  • Loading branch information
cxreg committed Apr 22, 2011
1 parent b19620d commit 95c9f29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/glyphinator.pl
Expand Up @@ -186,6 +186,11 @@
$e->rethrow;
} else {
my $e = Exception::Class->caught();
if ($e =~ /malformed JSON string/) {
diag("Caught malformed JSON error, restarting\n");
$status = {};
redo;
}
ref $e ? $e->rethrow : die $e;
}
}
Expand Down

0 comments on commit 95c9f29

Please sign in to comment.