Package org.svetovid
Class SvetovidException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.svetovid.SvetovidException
- All Implemented Interfaces:
 Serializable
- Direct Known Subclasses:
 SvetovidFormatException,SvetovidIOException,SvetovidJsonException
SvetovidException is the superclass of those exceptions that can be
 thrown during the operation of this library. SvetovidException and
 its subclasses are unchecked
 exceptions.- Author:
 - Ivan Pribela
 - See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionSvetovidException(String messageKey, Object... messageArguments) Constructs aSvetovidExceptionwith the specified message.SvetovidException(String messageKey, Throwable cause, Object... messageArguments) Constructs aSvetovidExceptionwith the specified detail message and cause. - 
Method Summary
Modifier and TypeMethodDescriptionprotected static voidappendStackTrace(StringBuilder builder, Throwable throwable, StackTraceElement[] originalStackTrace, String role, String prefix, Set<Throwable> dejaVu, ResourceBundle bundle, Locale locale) protected static voidappendStackTraceElement(StringBuilder builder, StackTraceElement element, String prefix, ResourceBundle bundle, Locale locale) protected static voidappendThreadInfo(StringBuilder builder, Thread thread, String prefix, ResourceBundle bundle, Locale locale) protected static voidappendThrowable(StringBuilder builder, Throwable throwable, String role, String prefix, ResourceBundle bundle, Locale locale) Returns the detail message string of this exception.getMessage(Locale locale) Creates a localized description of this exception.static StringgetStackTraceString(Thread thread, Throwable throwable, Locale locale) Returns the message string in the specified locale containing the supplied throwable and its stack trace.static StringgetStackTraceString(Throwable throwable, Locale locale) Returns the message string in the specified locale containing the supplied throwable and its stack trace.voidPrints this exception and its stack trace to the standard error stream.voidprintStackTrace(PrintStream stream) Prints this exception and its stack trace to the specified print stream.voidprintStackTrace(PrintStream stream, Locale locale) Prints this exception and its stack trace to the specified print stream in the specified locale.voidprintStackTrace(PrintWriter writer) Prints this exception and its stack trace to the specified print writer.voidprintStackTrace(PrintWriter writer, Locale locale) Prints this exception and its stack trace to the specified print writer in the specified locale.static voidprintStackTrace(Thread thread, Throwable throwable) Prints the supplied throwable and its stack trace to the standard error stream.static voidprintStackTrace(Thread thread, Throwable throwable, PrintStream stream) Prints the supplied throwable and its stack trace to the specified print stream.static voidprintStackTrace(Thread thread, Throwable throwable, PrintStream stream, Locale locale) Prints the supplied throwable and its stack trace to the specified print stream in the specified locale.static voidprintStackTrace(Thread thread, Throwable throwable, PrintWriter writer) Prints the supplied throwable and its stack trace to the specified print writer.static voidprintStackTrace(Thread thread, Throwable throwable, PrintWriter writer, Locale locale) Prints the supplied throwable and its stack trace to the specified print writer in the specified locale.static voidprintStackTrace(Thread thread, Throwable throwable, Locale locale) Prints the supplied throwable and its stack trace to the standard error stream in the specified locale.voidprintStackTrace(Locale locale) Prints this exception and its stack trace to the standard error stream in the specified locale.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString 
- 
Constructor Details
- 
SvetovidException
Constructs aSvetovidExceptionwith the specified message.- Parameters:
 messageKey- The resource bundle key of the detail message, which is saved for later retrieval by thegetMessage()methodmessageArguments- Optional arguments for formatting of the detail message
 - 
SvetovidException
Constructs aSvetovidExceptionwith the specified detail message and cause.Note that the detail message associated with
causeis not automatically incorporated into this exception's detail message.- Parameters:
 messageKey- The resource bundle key of the detail message, which is saved for later retrieval by thegetMessage()methodcause- The cause, which is saved for later retrieval by theThrowable.getCause()method. A null value is permitted, and indicates that the cause is nonexistent or unknown.messageArguments- Optional arguments for formatting of the detail message
 
 - 
 - 
Method Details
- 
getMessage
Returns the detail message string of this exception.- Overrides:
 getMessagein classThrowable- Returns:
 - the formatted detail message of this exception instance.
 
 - 
getMessage
Creates a localized description of this exception.- Parameters:
 locale- theLocalein which to return the message- Returns:
 - The localized description of this exception.
 
 - 
printStackTrace
public void printStackTrace()Prints this exception and its stack trace to the standard error stream.- Overrides:
 printStackTracein classThrowable
 - 
printStackTrace
Prints this exception and its stack trace to the specified print stream.- Overrides:
 printStackTracein classThrowable- Parameters:
 stream-PrintStreamto use for output
 - 
printStackTrace
Prints this exception and its stack trace to the specified print writer.- Overrides:
 printStackTracein classThrowable- Parameters:
 writer-PrintWriterto use for output
 - 
printStackTrace
Prints this exception and its stack trace to the standard error stream in the specified locale.- Parameters:
 locale- the local to use for printing
 - 
printStackTrace
Prints this exception and its stack trace to the specified print stream in the specified locale.- Parameters:
 stream-PrintStreamto use for outputlocale- the local to use for printing
 - 
printStackTrace
Prints this exception and its stack trace to the specified print writer in the specified locale.- Parameters:
 writer-PrintWriterto use for outputlocale- the local to use for printing
 - 
printStackTrace
Prints the supplied throwable and its stack trace to the standard error stream. If the thread is supplied also, its name is printed before the throwable.- Parameters:
 thread- the thread on which the throwable was thrown; if it isnullno thread info is printedthrowable- the throwable whose stack trace is to be printed
 - 
printStackTrace
Prints the supplied throwable and its stack trace to the specified print stream. If the thread is supplied also, its name is printed before the throwable.- Parameters:
 thread- the thread on which the throwable was thrown; if it isnullno thread info is printedthrowable- the throwable whose stack trace is to be printedstream-PrintStreamto use for output
 - 
printStackTrace
Prints the supplied throwable and its stack trace to the specified print writer. If the thread is supplied also, its name is printed before the throwable.- Parameters:
 thread- the thread on which the throwable was thrown; if it isnullno thread info is printedthrowable- the throwable whose stack trace is to be printedwriter-PrintWriterto use for output
 - 
printStackTrace
Prints the supplied throwable and its stack trace to the standard error stream in the specified locale. If the thread is supplied also, its name is printed before the throwable.- Parameters:
 thread- the thread on which the throwable was thrown; if it isnullno thread info is printedthrowable- the throwable whose stack trace is to be printedlocale- the local to use for printing
 - 
printStackTrace
public static void printStackTrace(Thread thread, Throwable throwable, PrintStream stream, Locale locale) Prints the supplied throwable and its stack trace to the specified print stream in the specified locale. If the thread is supplied also, its name is printed before the throwable.- Parameters:
 thread- the thread on which the throwable was thrown; if it isnullno thread info is printedthrowable- the throwable whose stack trace is to be printedstream-PrintStreamto use for outputlocale- the local to use for printing
 - 
printStackTrace
public static void printStackTrace(Thread thread, Throwable throwable, PrintWriter writer, Locale locale) Prints the supplied throwable and its stack trace to the specified print writer in the specified locale. If the thread is supplied also, its name is printed before the throwable.- Parameters:
 thread- the thread on which the throwable was thrown; if it isnullno thread info is printedthrowable- the throwable whose stack trace is to be printedwriter-PrintWriterto use for outputlocale- the local to use for printing
 - 
getStackTraceString
Returns the message string in the specified locale containing the supplied throwable and its stack trace.- Parameters:
 throwable- the throwable whose stack trace is to be printedlocale- the local to use for printing- Returns:
 - the string containing the supplied throwable and its stack trace.
 
 - 
getStackTraceString
Returns the message string in the specified locale containing the supplied throwable and its stack trace. If the thread is supplied also, its name is printed before the throwable.- Parameters:
 thread- the thread on which the throwable was thrown; if it isnullno thread info is printedthrowable- the throwable whose stack trace is to be printedlocale- the local to use for printing- Returns:
 - the string containing the supplied throwable and its stack trace.
 
 - 
appendThreadInfo
protected static void appendThreadInfo(StringBuilder builder, Thread thread, String prefix, ResourceBundle bundle, Locale locale)  - 
appendStackTrace
protected static void appendStackTrace(StringBuilder builder, Throwable throwable, StackTraceElement[] originalStackTrace, String role, String prefix, Set<Throwable> dejaVu, ResourceBundle bundle, Locale locale)  - 
appendThrowable
protected static void appendThrowable(StringBuilder builder, Throwable throwable, String role, String prefix, ResourceBundle bundle, Locale locale)  - 
appendStackTraceElement
protected static void appendStackTraceElement(StringBuilder builder, StackTraceElement element, String prefix, ResourceBundle bundle, Locale locale)  
 -