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

Fail on second router #384

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

ChrSteinert
Copy link
Contributor

This adds a failure, when use_router is called a second time, or use_router after no_router (or the other way around).
This is to avoid confusion: When a second (or more) router is added, only the last added router actually does things. An explicit error seems more useful.

Fixes #323.

I am happy to adjust the error messages, btw…

Adds a check when `use_router` is called twice, or `use_router` after
`no_router` or the other way around, and fail directly.
This is to prohibit setting two routers, which does not have any effect…
only the last router is used, which might be confusing.

Fixes SaturnFramework#323.
Add a warning in the XML doc about the new throws.
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.

use_router can be called multiple times, but only the last router is used
1 participant