-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite of EntitiesError
#828
Conversation
f587eb6
to
942cef2
Compare
Signed-off-by: Aaron Eline <aeline+github@amazon.com>
53b06be
to
6bdbc91
Compare
Signed-off-by: Aaron Eline <aeline+github@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. We'll probably want to take a second look at the exact structure and placement of sub modules once the whole error refactor is done
@@ -73,8 +73,45 @@ pub mod entities { | |||
self.inner.size_hint() | |||
} | |||
} | |||
|
|||
/// Errors around entities | |||
pub mod err { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Error type for an expression that is not a record | ||
#[derive(Debug)] | ||
pub struct NotARecord { | ||
/// Expression which is not a record | ||
expr: Box<RestrictedExpr>, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I'm late and this has already been merged, but since this is an error type, it would probably make sense for it to derive Error
, and have the error message defined here (and ContextCreationError::NotARecord
just have error(transparent)
)
Description of changes
Rewrite of entities error to bring inline with our general error strategy
Issue #, if available
#645
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):
cedar-policy
(e.g., changes to the signature of an existing API).I confirm that this PR (choose one, and delete the other options):
I confirm that
cedar-spec
(choose one, and delete the other options):