help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Gplk and exception handling


From: Heinrich Schuchardt
Subject: Re: [Help-glpk] Gplk and exception handling
Date: Mon, 10 Mar 2014 18:29:23 +0100

Hello Rabih,

please have a look at GLPK for Java to see how a decent wrapping can be done.
http://glpk-Java.sf.net

The error handling is in swig/glpk.i

It makes use of the error hook function.

See also
http://en.wikibooks.org/wiki/GLPK/Language_Bindings

Best regards

Heinrich Schuchardt

Am 10.03.14 um 18:12 schrieb Rabih Chaar

> Hello all,
> 
> I have a question concerning glpk and exception handling. 
> 
> I am mainly wrapping glpk to offer its functionalities in an object language. 
> 
> 
> 
> The resources like problems are wrapped in objects with a dispose method. 
> This is normally called when object is garbaged by gc. 
> 
> 
> 
> Looking at error.c, raising an exception calls the registered hook via 
> glp_error_hook, and calls afterward abort and exit. If the hook doesn't raise 
> immediately an exception, the runtime will crash via the abort call. 
> 
> 
> 
> Is this behavior deliberate?
> 
> Why not call abort and leave that to the calling function language to decide 
> when to throw?
> 
> 
> 
> Thanks in advance for your help. 
> 
> 
> 
> Rabih Chaar 
> 
> _______________________________________________
> 
> Help-glpk mailing list
> 
> address@hidden
> 
> https://lists.gnu.org/mailman/listinfo/help-glpk



reply via email to

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