1 21 22 package com.izforge.izpack.compiler; 23 24 29 public class CompilerException extends java.io.IOException 30 { 31 32 static final long serialVersionUID = 6247426753392546734L; 33 34 40 private Throwable _cause = this; 41 42 47 public CompilerException(String message) 48 { 49 super(message); 50 } 51 52 58 public CompilerException(String message, Throwable cause) 59 { 60 super(message); 61 this._cause = cause; 62 } 63 64 83 public synchronized Throwable initCause(Throwable cause) 84 { 85 if (this._cause != this) throw new IllegalStateException ("Can't overwrite cause"); 86 if (cause == this) throw new IllegalArgumentException ("Self-causation not permitted"); 87 this._cause = cause; 88 return this; 89 } 90 91 108 public Throwable getCause() 109 { 110 return (_cause == this ? null : _cause); 111 } 112 } 113 | Popular Tags |