Skip to content

feature!: throw exception if controller cannot be registered #641

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

Merged
merged 2 commits into from
Oct 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,11 @@ public void close() {
throws OperatorException {
final var existing = configurationService.getConfigurationFor(controller);
if (existing == null) {
log.warn(
"Skipping registration of {} controller named {} because its configuration cannot be found.\n"
+ "Known controllers are: {}",
controller.getClass().getCanonicalName(),
ControllerUtils.getNameFor(controller),
configurationService.getKnownControllerNames());
throw new IllegalStateException(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't that be an OperatorException instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed.

"Cannot register controller with name " + controller.getClass().getCanonicalName() +
" controller named " + ControllerUtils.getNameFor(controller)
+ " because its configuration cannot be found.\n" +
" Known controllers are: " + configurationService.getKnownControllerNames());
} else {
if (configuration == null) {
configuration = existing;
Expand Down