diff options
Diffstat (limited to 'java/12-error-handling-2/MathsTest.java')
| -rw-r--r-- | java/12-error-handling-2/MathsTest.java | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/java/12-error-handling-2/MathsTest.java b/java/12-error-handling-2/MathsTest.java deleted file mode 100644 index 7b6827c..0000000 --- a/java/12-error-handling-2/MathsTest.java +++ /dev/null @@ -1,32 +0,0 @@ -public class MathsTest { - - /** - * @param args - */ - public static void main(String[] args) { - Maths m = new Maths(); - int result = 0; - - try { - m.factorial(-5); - m.factorial(5); // Not executed - } catch (MathsException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - try { - result = m.factorial(-5); - // ... - } catch(MathsException me) { -// System.err.println(me.getX()); - System.err.println("Factorial method failed"); - } finally { - System.out.println("Inside finally block"); - } - - System.out.println(result); - - } - -} |
