public interface HandleableException
| Modifier and Type | Method and Description |
|---|---|
HandleableException |
config(Class<? extends Exception> root,
Class<? extends RuntimeException> translateTo,
String message)
Mapping
root checked exception to translateTo unchecked. |
HandleableException |
config(Class<? extends Exception> root,
String message)
Mapping
root checked exception to unchecked, RuntimeException. |
Class<? extends RuntimeException> |
getDefaultException() |
void |
handle(Exception catched) |
void |
handle(Exception catched,
String message) |
boolean |
isMute() |
boolean |
isMute(Class<? extends Exception> ex) |
HandleableException |
logInfoOff() |
HandleableException |
logInfoOn() |
HandleableException |
mute() |
HandleableException |
mute(Class<? extends Exception> ex) |
void |
throwMessage(String message,
Object... args)
Throw a Default Exception with a specific message using the specified formatted string and arguments.
|
HandleableException config(Class<? extends Exception> root, Class<? extends RuntimeException> translateTo, String message)
root checked exception to translateTo unchecked.root - checked exception expectedtranslateTo - translate to another unchecked exceptionmessage - content of exceptionHandleableException config(Class<? extends Exception> root, String message)
root checked exception to unchecked, RuntimeException.root - checked exception expectedmessage - content of exceptionvoid throwMessage(String message, Object... args)
message - a format message, like: can not found method %s for class %sargs - Arguments referenced by the format specifiers in the format string.Class<? extends RuntimeException> getDefaultException()
HandleableException mute()
HandleableException mute(Class<? extends Exception> ex)
boolean isMute()
HandleableException logInfoOn()
HandleableException logInfoOff()
Copyright © 2012–2020 jkniv, copyleft code. All rights reserved.