1 53 54 106 107 package com.Yasna.forum; 108 109 import java.io.PrintStream ; 110 import java.io.PrintWriter ; 111 112 115 public class UnauthorizedException extends Exception { 116 117 private Throwable nestedThrowable = null; 118 119 public UnauthorizedException() { 120 super(); 121 } 122 123 public UnauthorizedException( String msg ) { 124 super(msg); 125 } 126 127 public UnauthorizedException(Throwable nestedThrowable) { 128 this.nestedThrowable = nestedThrowable; 129 } 130 131 public UnauthorizedException(String msg, Throwable nestedThrowable) { 132 super(msg); 133 this.nestedThrowable = nestedThrowable; 134 } 135 136 public void printStackTrace() { 137 super.printStackTrace(); 138 if (nestedThrowable != null) { 139 nestedThrowable.printStackTrace(); 140 } 141 } 142 143 public void printStackTrace(PrintStream ps) { 144 super.printStackTrace(ps); 145 if (nestedThrowable != null) { 146 nestedThrowable.printStackTrace(ps); 147 } 148 } 149 150 public void printStackTrace(PrintWriter pw) { 151 super.printStackTrace(pw); 152 if (nestedThrowable != null) { 153 nestedThrowable.printStackTrace(pw); 154 } 155 } 156 } 157 | Popular Tags |