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

Address exception classes for user vs. program errors #784

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

restenb
Copy link
Member

@restenb restenb commented Feb 7, 2025

This PR fixes #782 by changing to std::runtime_error where the cause is incorrect configuration in the XMLs.

While that squashes one loose chicken, a cursory glance at the codebase reveals several other places that could use similar changes. For instance, std::invalid_argument exceptions still abound in scenario_parser.cpp. And there probably are other places where std::out_of_range or std::logic_error may be dubiously applied.

Copy link
Member

@kyllingstad kyllingstad left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Missing OSPModelDescription.xml causes logic_error to be thrown
2 participants