< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.common/src/jdk/vm/ci/common/JVMCIError.java

Print this page

        

@@ -29,11 +29,10 @@
  * Indicates a condition in JVMCI related code that should never occur during normal operation.
  */
 public class JVMCIError extends Error {
 
     private static final long serialVersionUID = 531632331813456233L;
-    private final ArrayList<String> context = new ArrayList<>();
 
     public static RuntimeException unimplemented() {
         throw new JVMCIError("unimplemented");
     }
 

@@ -99,31 +98,10 @@
      */
     public JVMCIError(Throwable cause) {
         super(cause);
     }
 
-    /**
-     * This constructor creates a {@link JVMCIError} and adds all the
-     * {@linkplain #addContext(String) context} of another {@link JVMCIError}.
-     *
-     * @param e the original {@link JVMCIError}
-     */
-    public JVMCIError(JVMCIError e) {
-        super(e);
-        context.addAll(e.context);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder str = new StringBuilder();
-        str.append(super.toString());
-        for (String s : context) {
-            str.append("\n\tat ").append(s);
-        }
-        return str.toString();
-    }
-
     private static String format(String msg, Object... args) {
         if (args != null) {
             // expand Iterable parameters into a list representation
             for (int i = 0; i < args.length; i++) {
                 if (args[i] instanceof Iterable<?>) {

@@ -135,15 +113,6 @@
                 }
             }
         }
         return String.format(Locale.ENGLISH, msg, args);
     }
-
-    public JVMCIError addContext(String newContext) {
-        this.context.add(newContext);
-        return this;
-    }
-
-    public JVMCIError addContext(String name, Object obj) {
-        return addContext(format("%s: %s", name, obj));
-    }
 }
< prev index next >