help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Re: fault function


From: Andrew Makhorin
Subject: [Help-glpk] Re: fault function
Date: Fri, 28 Nov 2003 12:56:22 +0300

>I call GLPK with the API routines inside a MEX interface for
>Matlab. I have seen that in GLPK when something goes wrong the 'fault'
>function is called and this crashes Matlab. 
>Where is the fault function defined? Is it standard C ?
>I would like avoiding the crash modifying the fault function. Could
>there be an elegant way to do this?

The routine fault is declared in glplib2.c. It is used to terminate
program execution only if the user program passes incorrect parameters
to glpk api routines, i.e. corresponding errors should be thought as
fatal (like segmentation fault, for example). So most elegant way to
prevent crashing is not to pass incorrect parameters to api routines.
Another way is to use the routine lib_set_fault_hook (see comments to
this routine in glplib2.c).






reply via email to

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