You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a couple of places, SeQuant simply calls abort if it has entered part of the code which has either not been implemented or which indicates that the function has been used in a wrong way (e.g. doesn't make sense).
However, this is sub-optimal for users as abort will just do that: abort the program with no indication whatsoever about what (and where something) has gone wrong.
Thus, they'll have to load SeQuant into a debugger, find where abort is called and then check the source code to either try and figure out themselves why abort is called or hope to find a comment there explaining just that.
It would be much more user-friendly, if at least an error message was printed in such cases.
Additionally, it seems to me that there are two different handling strategies that are used in SeQuant for this kind of situation:
Calling abort
Throwing an exception
The latter has the big advantage of giving the end-user a hint as to what has gone wrong. However, exceptions can be caught and ignored and there are situations where one might not want that. But on the other hand, I think this would then be the end-user intentionally shooting in their own foot, so I wouldn't worry about that.
Therefore, I would like to refactor the code to replace abort either with a throw statement or at least add a line that prints an error message before that (probably in form of a macro, similar to assert).
The text was updated successfully, but these errors were encountered:
In a couple of places, SeQuant simply calls
abort
if it has entered part of the code which has either not been implemented or which indicates that the function has been used in a wrong way (e.g. doesn't make sense).However, this is sub-optimal for users as
abort
will just do that: abort the program with no indication whatsoever about what (and where something) has gone wrong.Thus, they'll have to load SeQuant into a debugger, find where
abort
is called and then check the source code to either try and figure out themselves whyabort
is called or hope to find a comment there explaining just that.It would be much more user-friendly, if at least an error message was printed in such cases.
Additionally, it seems to me that there are two different handling strategies that are used in SeQuant for this kind of situation:
abort
The latter has the big advantage of giving the end-user a hint as to what has gone wrong. However, exceptions can be caught and ignored and there are situations where one might not want that. But on the other hand, I think this would then be the end-user intentionally shooting in their own foot, so I wouldn't worry about that.
Therefore, I would like to refactor the code to replace
abort
either with athrow
statement or at least add a line that prints an error message before that (probably in form of a macro, similar toassert
).The text was updated successfully, but these errors were encountered: