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
Ideally it should be possible to report a problem without throwing an exception, and without just printing to stderr.
Some alternatives:
use some 3rd party logging library which has a system for controlling where the output goes
advantage: easy
disadvantages: not very flexible, probably not re-entrant
pass around an error handling callback
advantage: re-entrant, flexible
disadvantage: potentially a lot of work
store a global error-handling callback
advantage: simple and flexible
disadvantage: not re-entrant
IMO it would be really good to have a "warning hierarchy" as in libear, to allow users to decide what to ignore, and what to turn into errors. This rules out option 1.
If 2 was implemented nicely, it might be possible to make messages really nice by adding context, like: "while parsing ABF_XXX: invalid time format 'yyy'".
The text was updated successfully, but these errors were encountered:
Ideally it should be possible to report a problem without throwing an exception, and without just printing to stderr.
Some alternatives:
IMO it would be really good to have a "warning hierarchy" as in libear, to allow users to decide what to ignore, and what to turn into errors. This rules out option 1.
If 2 was implemented nicely, it might be possible to make messages really nice by adding context, like: "while parsing ABF_XXX: invalid time format 'yyy'".
The text was updated successfully, but these errors were encountered: