Hello Chris,

> For implementing exceptions in C you might consider the standard C
> library routine, setjmp, to implement asynchronous exceptions.
> (i.e. throw/try/catch)

Thank you for your suggestion.

That is exactly what I am using.

// Exception handling
%exception {
    jmp_buf glp_java_env;

    if (setjmp(glp_java_env)) {
        glp_java_throw(jenv, "function $name failed");
    } else {
        glp_error_hook(glp_java_error_hook, &glp_java_env);
        $function;
    }
    glp_error_hook(NULL, NULL);
}

Best regards

Xypron
-- 
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/atbrowser


_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to