help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] C++ throw instead of C exit


From: Andrew Makhorin
Subject: Re: [Help-glpk] C++ throw instead of C exit
Date: Wed, 20 Jan 2010 22:08:06 +0300

> This looks fine from my perspective.  System function
> 'abort' and not 'exit' as I wrote -- it was a while since I
> looked at the GLPK source.

In case of application fatal error the GNU coding standards suggest
to use abort rather than exit, because abort allows using a debugger.
(Though most of errors detected by glpk api routines are not fatal.)

>   I am in no great hurry to use
> this feature so it doesn't have to be in the next release.
> You may need to expand on the use of 'info' in the
> documentation (void* is not often used in C++).

It is a magic cookie, i.e. a pointer, which one can use to pass some
necessary information to the exit routine not using a static variable.
Glp_error_hook needs to know nothing about such information, so 'void *'
is a most appropriate type.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]