Skip to content
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

New Middleware demo in C# #297

Merged
merged 3 commits into from
Feb 13, 2025

Conversation

bernardnormier
Copy link
Member

This PR adds a new middleware demo in C#. It will replace the interceptor demo.

// ObjectNotExistException is one of the 6 Ice local exceptions that Ice transmits "over the wire".
// It usually means "no servant was found for this identity". Here, we reuse it to indicate an authorization
// failure without leaking information to the client.
throw new Ice.ObjectNotExistException();
Copy link
Member Author

Choose a reason for hiding this comment

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

The most debatable aspect to this demo. There is no perfect solution with the Ice protocol since "system exceptions" are not extensible.

Defining a new user exception, like in the existing interceptor demo, is not good as it pollutes all Slice operation signatures.

UnknownException works but triggers by default a log from the logger middleware (Ice.Warn.Dispatch=1 by default). ONE or perhaps OpNE sounds like the best option.

@bernardnormier bernardnormier merged commit b3640d9 into zeroc-ice:main Feb 13, 2025
7 checks passed
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.

3 participants