gtrsk / or-tools

Automatically exported from code.google.com/p/or-tools
0 stars 0 forks source link

Handle exceptions from C++ via SWIG to Java #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using Ortools Java on OS X.  Exception from C++ simply crashes the JVM with 
core dump.  It's very desirable for Java code to be able to catch exceptions 
from C++ code.   

Can we add exception handling (re-throwing C++ exception as Java exception) in 
SWIG?  If would sufficient to simply re-throw as Java RuntimeException.

http://www.swig.org/Doc3.0/SWIGDocumentation.html#SWIGPlus_exception_specificati
ons

Original issue reported on code.google.com by yunjun...@gmail.com on 14 Nov 2014 at 3:47

GoogleCodeExporter commented 9 years ago
Meant to say "It would be sufficient to simply re-throw uncaught C++ exceptions 
as Java RuntimeException."

Original comment by yunjun...@gmail.com on 17 Nov 2014 at 8:41