Skip to content

Commit

Permalink
Introduce a more generally applicable X::ArrayShapeMismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 7, 2018
1 parent d92b155 commit dd03014
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/Exception.pm6
Expand Up @@ -2946,13 +2946,16 @@ my class X::IllegalDimensionInShape is Exception {
}
}

my class X::Assignment::ArrayShapeMismatch is Exception {
my class X::ArrayShapeMismatch is Exception {
has $.action = "assign";
has $.target-shape;
has $.source-shape;
method message() {
"Cannot assign an array of shape $.source-shape to an array of shape $.target-shape"
}
}
my class X::Assignment::ArrayShapeMismatch is X::ArrayShapeMismatch {
}

my class X::Assignment::ToShaped is Exception {
has $.shape;
Expand Down

0 comments on commit dd03014

Please sign in to comment.