whenever java code is throwing Error / RunTimeException, made changes so that c++ code aborts()