Skip to content

Commit

Permalink
Slight boo-boo with the exception
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanstowe committed Feb 18, 2016
1 parent c32b488 commit 96694b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion META6.json
Expand Up @@ -26,5 +26,5 @@
"Test::META"
],
"description" : "Infer Perl 6 Classes from JSON input",
"version" : "0.0.8"
"version" : "0.0.9"
}
2 changes: 1 addition & 1 deletion bin/p6-json-infer
Expand Up @@ -5,7 +5,7 @@ use JSON::Infer;
multi sub MAIN(Str :$file, Str :$uri, Str :$out-dir = "lib", Str :$class-name!) {

CATCH {
when JSON::Infer::Exception {
when X::Infer {
note $_.message;
exit 5;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/JSON/Infer.pm
Expand Up @@ -216,7 +216,7 @@ This returns a suitable string representation of the attribute for Perl.
use JSON::Tiny;
use HTTP::UserAgent;

class JSON::Infer:ver<0.0.8>:auth<github:jonathanstowe> {
class JSON::Infer:ver<0.0.9>:auth<github:jonathanstowe> {


role Classes { ... }
Expand All @@ -225,7 +225,7 @@ class JSON::Infer:ver<0.0.8>:auth<github:jonathanstowe> {
class Class { ... }
class Type { ... }

class X::Exception is Exception {
class X::Infer is Exception {
has Str $.message is rw;
has Str $.uri is rw;
has Exception $.inner-exception is rw;
Expand Down Expand Up @@ -473,7 +473,7 @@ class JSON::Infer:ver<0.0.8>:auth<github:jonathanstowe> {
$ret = samewith(:$json, :$class-name);
}
else {
X::Exception.new(:$uri, message => "Couldn't retrieve URI $uri").throw;
X::Infer.new(:$uri, message => "Couldn't retrieve URI $uri").throw;
}
$ret;
}
Expand All @@ -484,7 +484,7 @@ class JSON::Infer:ver<0.0.8>:auth<github:jonathanstowe> {
samewith(file => $io, :$class-name);
}
else {
X::Exception.new(uri => $file, message => "File $file does not exist").throw;
X::Infer.new(uri => $file, message => "File $file does not exist").throw;
}
}

Expand Down

0 comments on commit 96694b7

Please sign in to comment.