Skip to content

Commit

Permalink
return additional error
Browse files Browse the repository at this point in the history
  • Loading branch information
khieta committed Jun 4, 2024
1 parent 4b73c74 commit c932356
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cedar-policy-core/src/est.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ impl TryFrom<cst::Cond> for Clause {
let maybe_is_when = cond.cond.to_cond_is_when();
match cond.expr {
None => {
let ident = maybe_is_when.map(|is_when| {
let maybe_ident = maybe_is_when.map(|is_when| {
cst::Ident::Ident(if is_when { "when" } else { "unless" }.into())
})?;
});
Err(cond
.cond
.to_ast_err(ToASTErrorKind::EmptyClause(Some(ident)))
.to_ast_err(ToASTErrorKind::EmptyClause(maybe_ident.ok()))
.into())
}
Some(ref e) => {
Expand Down

0 comments on commit c932356

Please sign in to comment.