1 11 package org.eclipse.core.databinding; 12 13 import java.io.PrintStream ; 14 import java.io.PrintWriter ; 15 16 21 public class BindingException extends RuntimeException { 22 23 26 private static final long serialVersionUID = -4092828452936724217L; 27 private Throwable cause; 28 29 34 public BindingException(String message) { 35 super(message); 36 } 37 38 44 public BindingException(String message, Throwable cause) { 45 super(message); 46 this.cause = cause; 47 } 48 49 public void printStackTrace(PrintStream err) { 50 super.printStackTrace(err); 51 if (cause != null) { 52 err.println("caused by:"); cause.printStackTrace(err); 54 } 55 } 56 57 public void printStackTrace(PrintWriter err) { 58 super.printStackTrace(err); 59 if (cause != null) { 60 err.println("caused by:"); cause.printStackTrace(err); 62 } 63 } 64 } 65 | Popular Tags |