Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Catch exceptions in sprintf that come from Parrot, and just return a …
…Failure.
  • Loading branch information
jnthn committed Aug 25, 2009
1 parent 9efc9fe commit 8b525f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/classes/Str.pir
Expand Up @@ -84,8 +84,13 @@ Returns a Perl representation of the Str.
.param pmc args :slurpy
args.'!flatten'()
$P0 = new ['Str']
push_eh args_fail
sprintf $P0, self, args
pop_eh
.return ($P0)
args_fail:
pop_eh
.tailcall '!FAIL'('Insufficient arguments supplied to sprintf')
.end

=item succ and pred
Expand Down

0 comments on commit 8b525f1

Please sign in to comment.