[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Re: Compiling glpsol.java using glpk_java
From: |
glpk xypron |
Subject: |
Re: [Help-glpk] Re: Compiling glpsol.java using glpk_java |
Date: |
Thu, 04 Mar 2010 07:37:13 +0100 |
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