1 33 34 package edu.rice.cs.drjava.model.repl.newjvm; 35 36 42 public class ExceptionResult implements InterpretResult { 43 private final String _exceptionClass; 44 private final String _exceptionMessage; 45 private final String _stackTrace; 46 private final String _specialMessage; 47 48 public ExceptionResult(final String exceptionClass, 49 final String exceptionMessage, 50 final String stackTrace, 51 final String specialMessage) { 52 53 _exceptionClass = exceptionClass; 54 _exceptionMessage = exceptionMessage; 55 _stackTrace = stackTrace; 56 _specialMessage = specialMessage; 57 } 58 59 public String getExceptionClass() { return _exceptionClass; } 60 public String getExceptionMessage() { return _exceptionMessage; } 61 public String getStackTrace() { return _stackTrace; } 62 public String getSpecialMessage() { return _specialMessage; } 63 64 public <T> T apply(InterpretResultVisitor<T> v) { return v.forExceptionResult(this); } 65 66 public String toString() { return "(exception: " + _exceptionClass + ")"; } 67 } 68 | Popular Tags |