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

Cryptic error message with ill-defined or missing osp:FixedStepMaster in SSP #338

Closed
markaren opened this issue Aug 27, 2019 · 1 comment · Fixed by #373
Closed

Cryptic error message with ill-defined or missing osp:FixedStepMaster in SSP #338

markaren opened this issue Aug 27, 2019 · 1 comment · Fixed by #373
Labels
bug Something isn't working

Comments

@markaren
Copy link
Contributor

markaren commented Aug 27, 2019

This may be nitpicking, but the following error message is a bit "out there" when the user does not properly define the

<ssc:Annotation type="org.open-simulation-platform">
  <osp:SimulationInformation>
     <osp:FixedStepMaster description="FixedStepAlgorithm" stepSize="0.05"/>
  </osp:SimulationInformation>
 </ssc:Annotation>

e.g by misspelling FixedStepMaster

The error:

Error: cse::fixed_step_algorithm::impl::impl: Input requirement not satisfied: baseStepSize.count() > 0
@markaren markaren changed the title Cryptic error message with ill-defined osp:FixedStepMaster in SSP Cryptic error message with ill-defined or missing osp:FixedStepMaster in SSP Aug 27, 2019
@kyllingstad
Copy link
Member

I agree. No errors generated by CSE_INPUT_CHECK() should ever be shown to the user. They are for the programmers' benefit alone.

In fact, I'd say that all std::logic_error-derived exceptions point to program errors, not user errors. (It's kind of analogous to the Error and RuntimeException classes in Java.) In CSE CLI I've made this explicit by prepending such error messages (if they ever occur) with "Internal error:" rather than just "Error:" to make it obvious that the programmer is to blame, not the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants