|
From: | Sylvain Fournier |
Subject: | Re: [Help-glpk] Gplk and exception handling |
Date: | Mon, 17 Mar 2014 10:50:55 -0300 |
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
_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk
[Prev in Thread] | Current Thread | [Next in Thread] |