class Ideone { public static void main(String[] args) { int x = 10; calculateX(x); } private static void calculateX(int x) { try { throw new ArithmeticException("" + "divide by 0"); } catch (Exception e) { throw new RuntimeException("Run time error " + e.getMessage() , e); } }}
Standard input is empty
Standard output is empty
Exception in thread "main" java.lang.RuntimeException: Run time error divide by 0 at Ideone.calculateX(Main.java:12) at Ideone.main(Main.java:4) Caused by: java.lang.ArithmeticException: divide by 0 at Ideone.calculateX(Main.java:9) ... 1 more
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!