Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Throw a typed exception for empty reqd parameter
  • Loading branch information
coke committed Jun 23, 2015
1 parent b66a0ac commit 1955a5a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/core/Mu.pm
@@ -1,6 +1,7 @@
my class X::Constructor::Positional { ... }
my class X::Method::NotFound { ... }
my class X::Constructor::Positional { ... }
my class X::Method::NotFound { ... }
my class X::Method::InvalidQualifier { ... }
my class X::Attribute::Required { ... }

my class Mu { # declared in BOOTSTRAP
proto method ACCEPTS(|) { * }
Expand Down Expand Up @@ -180,8 +181,9 @@ my class Mu { # declared in BOOTSTRAP
}
}
elsif nqp::iseq_i($code, 11) {
# TODO throw a typed exception
nqp::say("eek, a required field!");
X::Attribute::Required.new(name =>
nqp::p6box_s(nqp::atpos($task, 2))
).throw;
}
else {
die "Invalid BUILDALLPLAN";
Expand Down

0 comments on commit 1955a5a

Please sign in to comment.