> There is one problem though: the new code does not reset the error
> indicator to 0 before calling err_hook().
The error indicator is set to 0 on initializing glpk environment; see
the routine glp_init_env in glpk/src/env/env.c.
> So even if the error hook uses
> longjmp() to continue execution, the error state remains set.
>
If glp_error is called and your hook routine performs longjmp to prevent
aborting, you should *not* call glpk routines until the glpk environment
is reinitialized as Heinrich suggests.
The glpk reference manual says (6.1.13):
If the hook routine returns, the application program is
abnormally terminated. To prevent abnormal termination the hook
routine may perform a global jump using the standard function
longjmp, in which case the application program *must* call the
routine glp_free_env.
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk