From 6462c159aa36d30123fb30cdaf5d1f4c9eb5acb2 Mon Sep 17 00:00:00 2001 From: Marcin Olawski Date: Sat, 7 Feb 2015 21:12:04 +0100 Subject: [PATCH] Add ArrayIndexOutOfBoundsException(int) and ClassNotFoundException.getException(). --- classpath/java/lang/ArrayIndexOutOfBoundsException.java | 4 ++++ classpath/java/lang/ClassNotFoundException.java | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/classpath/java/lang/ArrayIndexOutOfBoundsException.java b/classpath/java/lang/ArrayIndexOutOfBoundsException.java index 1478a62a2e..3ba5fccdec 100644 --- a/classpath/java/lang/ArrayIndexOutOfBoundsException.java +++ b/classpath/java/lang/ArrayIndexOutOfBoundsException.java @@ -23,6 +23,10 @@ public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException { this(null, cause); } + public ArrayIndexOutOfBoundsException(int idx) { + this("Array index out of range: " + idx); + } + public ArrayIndexOutOfBoundsException() { this(null, null); } diff --git a/classpath/java/lang/ClassNotFoundException.java b/classpath/java/lang/ClassNotFoundException.java index 86e6b82c8c..361525b917 100644 --- a/classpath/java/lang/ClassNotFoundException.java +++ b/classpath/java/lang/ClassNotFoundException.java @@ -25,4 +25,9 @@ public class ClassNotFoundException extends Exception { public ClassNotFoundException() { this(null, null); } + + public Throwable getException() { + return cause2; + } + }