Skip to content

Commit f1ea070

Browse files
committed
Propagate error when attempting to assign to an Expr without a defined shape.
1 parent 2fe36c8 commit f1ea070

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/expr.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,10 @@ impl<T: TensorType> Assign<T> {
610610
.with_values(&values)?
611611
)
612612
} else {
613-
panic!("Cannot assign to expression with unknown size!")
613+
return Err(invalid_arg!(
614+
"Cannot assign to expression {} with unknown size!",
615+
variable
616+
));
614617
};
615618

616619
Ok(Assign::new_expr(variable, constant))

0 commit comments

Comments
 (0)