Skip to content

Conversation

@cdisselkoen
Copy link
Contributor

Description of changes

Better source location for the error mentioned in #736

Issue #, if available

#736

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A change "invisible" to users (e.g., documentation, changes to "internal" crates like cedar-policy-core, cedar-validator, etc.)

I confirm that this PR (choose one, and delete the other options):

  • Does not update the CHANGELOG because my change does not significantly impact released code.

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar formal model or DRT infrastructure.

Signed-off-by: Craig Disselkoen <[email protected]>
match num_slots {
Some(slot_id) => Err(UnexpectedSlotError::FoundSlot(slot_id))?,
match first_slot {
Some(slot) => Err(UnexpectedSlotError::FoundSlot(slot.id))?,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this error is pub use'ed, so could we add the loc to it also?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this simple idea led to a larger refactor. Re-review needed.

Signed-off-by: Craig Disselkoen <[email protected]>
Signed-off-by: Craig Disselkoen <[email protected]>
@cdisselkoen cdisselkoen merged commit 4235311 into main Mar 29, 2024
@cdisselkoen cdisselkoen deleted the cdisselkoen/fix-736 branch March 29, 2024 15:55
shaobo-he-aws pushed a commit that referenced this pull request Apr 11, 2024
Signed-off-by: Craig Disselkoen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Source location for error "found template slot in a when clause" should be more specific

4 participants