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 stdlib_experimental_error.f90, there is the following example: call error_stop("Invalid argument")
A similar case can be found in stdlib_experimental_io.f90.
When running a large program, messages such as "Invalid argument" are quite useless. Should we discuss and agree on a good way to mention error messages, e.g.,
The best way I've ever found to get good error messages and be able to do so even when using elemental or pure procedures is to define an error_stack_t class with a bunch of pure methods for pushing, popping, signalling (raising?) and then non-pure methods to catch and handle the errors.
I opened #95 to get more feedback. It could be used for the purpose described in this issue.
A minimal improvement is to at least list the name of the function in the error message as @jvdp1 suggested. Ideally the compiler would be able to optionally generate a nice stacktrace when the program ends with a non-zero exit code.
In
stdlib_experimental_error.f90
, there is the following example:call error_stop("Invalid argument")
A similar case can be found in
stdlib_experimental_io.f90
.When running a large program, messages such as "Invalid argument" are quite useless. Should we discuss and agree on a good way to mention error messages, e.g.,
ERROR (_name_of_the_function_): Invalid argument (_argument_)
The text was updated successfully, but these errors were encountered: