1 package de.webman.util.registry; 2 3 import java.io.PrintStream ; 4 import java.io.PrintWriter ; 5 6 7 14 public class RegistryException 15 extends Exception 16 { 17 18 19 22 private Exception cause = null; 23 24 27 public RegistryException () { 28 } 29 30 public RegistryException (String s) { 31 super(s); 32 } 33 34 public RegistryException (Exception _cause) { 35 cause = _cause; 36 } 37 38 39 44 public String getMessage () { 45 return (cause == null 46 ? super.getMessage() 47 : cause.getMessage()); 48 } 49 50 55 public String getLocalizedMessage () { 56 return (cause == null 57 ? super.getLocalizedMessage() 58 : cause.getLocalizedMessage()); 59 } 60 61 66 public String toString () 67 { 68 return (cause == null 69 ? super.toString() 70 : cause.toString()); 71 } 72 73 77 public void printStackTrace () 78 { 79 if (cause == null) { 80 super.printStackTrace(); 81 } 82 else { 83 printStackTrace(); 84 } 85 } 86 87 93 public void printStackTrace (PrintStream ps) 94 { 95 if (cause == null) { 96 super.printStackTrace(ps); 97 } 98 else { 99 cause.printStackTrace(ps); 100 } 101 } 102 103 109 public void printStackTrace (PrintWriter pw) 110 { 111 if (cause == null) { 112 super.printStackTrace(pw); 113 } 114 else { 115 cause.printStackTrace(pw); 116 } 117 } 118 } 119 | Popular Tags |