[Top][All Lists]

[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: Tue, 19 Jan 2010 00:30:46 +0300

> Any thoughts on the proposal?

Currently in case of fatal error all glpk routines call the routine
xerror (_glp_lib_xerror), which prints an error message and then
calls the standard function abort. It is assumed that the application
program can catch SIGABRT signal, if necessary.

To make the error handling more convenient I will add the following
api routine:

   void glp_error_hook(void (*func)(void *info), void *info);

The parameter func is a user-defined routine, which is installed to
be called from xerror; if it returns, xerror calls abort. The parameter
info is a transit pointer (magic cookie) passed to func.

reply via email to

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