package som.interpreter;

import som.vmobjects.SAbstractObject;


public final class SomException extends RuntimeException {

  private static final long serialVersionUID = -639789248178270606L;
  private final SAbstractObject somObj;

  public SomException(final SAbstractObject somObj) {
      /*
       * We use the super constructor that initializes the cause to null.
       * Without that, the cause would be this exception itself. This helps
       * escape analysis: it avoids the circle of an object pointing to itself.
       */
      super((Throwable) null);
      this.somObj = somObj;
  }

  public SAbstractObject getSomObject() {
    return somObj;
  }

  /**
   * For performance reasons, this exception does not record any stack trace
   * information.
   *
   * TODO: at some point, fill in a SOMns stack...
   */
  @SuppressWarnings("sync-override")
  @Override
  public Throwable fillInStackTrace() {
      return null;
  }
}

@@ -936,11 +936,111 @@
 ull;%0A  %7D
+%0A%0A  @Override%0A  public String toString() %7B%0A    return %22SomException%5B%22 + somObj.toString() + %22%5D%22;%0A  %7D
 %0A%7D%0A

Add SomException.toString