Permalink
Browse files

another exception handling update

  • Loading branch information...
1 parent b1ba03b commit dd1312b8b7d39e42fbeb2b455231dbddd2fa38a7 @moritz moritz committed Mar 29, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/URI.pm
View
@@ -29,7 +29,6 @@ method parse (Str $str) {
$!frag = Mu;
%!query_form = @!segments = Nil;
- my $note_caught;
try {
if ($.is_validating) {
$!grammar.parse_validating($c_str);
@@ -39,10 +38,11 @@ method parse (Str $str) {
}
CATCH {
- $note_caught++; # exception handling still needs some work ...
+ default {
+ die "Could not parse URI: $str"
+ }
}
}
- if $note_caught {die "Could not parse URI: $str" }
# now deprecated
$!uri = $!grammar.parse_result;

0 comments on commit dd1312b

Please sign in to comment.