Closed v0dro closed 5 years ago
The current error handling mostly consists of reporting the error and if there is no way of recovery (e.g. when the system is out of memory), aborting the program.
stderr
, or handled by GKS if the data is simply passed through to it.gks_perror
and related functions (like gks_report_error
and gks_fatal_error
) in error.c.gr3_geterror
and gr3_geterrorstring
, which translate more easily into exceptions in wrappers, e.g. in python-gr.
I searched the code base but could not find any standardized way in which GR handles errors. Most C libraries that I've worked with in the past return some integer value from functions in case they fail.
What sort of mechanism is followed for this purpose in GR? Am I missing something?