1 55 56 package org.jboss.axis; 57 58 import org.jboss.axis.utils.Messages; 59 import org.jboss.logging.Logger; 60 61 69 public class InternalException extends RuntimeException 70 { 71 72 private static Logger log = Logger.getLogger(InternalException.class.getName()); 73 74 80 private static boolean shouldLog = true; 81 82 85 public static void setLogging(boolean logging) 86 { 87 shouldLog = logging; 88 } 89 90 93 public static boolean getLogging() 94 { 95 return shouldLog; 96 } 97 98 104 public InternalException(String message) 105 { 106 this(new Exception (message)); 107 } 108 109 114 public InternalException(Exception e) 115 { 116 super(e.toString()); 117 118 if (shouldLog) 119 { 120 if (e instanceof InternalException) 123 { 124 log.debug("InternalException: ", e); 125 } 126 else 127 { 128 log.fatal(Messages.getMessage("exception00"), e); 129 } 130 } 131 } 132 } 133 | Popular Tags |