Handle Java exceptions thrown in calls from C, printing and aborting