void (String argv[]) { boolean callingMethod1 = false; try { int i = (int) 0; callingMethod1 = true; testMethod1(); callingMethod1 = false; testMethod2(); } catch (IOException e) { if (callingMethod1) System.err.println("Error while calling method 1"); else System.err.println("Error while calling method 2"); } }