Skip to content

Commit

Permalink
check backend type
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaminsk committed Dec 11, 2024
1 parent 7ff4e13 commit 72c4061
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libclingo/src/control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2221,6 +2221,9 @@ extern "C" bool clingo_control_register_backend(clingo_control_t *control, cling
backend = Output::make_backend(std::move(out), Output::OutputFormat::INTERMEDIATE, false, false);
break;
}
default: {
throw std::runtime_error("invalid backend type given");
}
}
control->registerObserver(std::move(backend), replace);
}
Expand Down

0 comments on commit 72c4061

Please sign in to comment.