Package org
Class ErrorMsg
java.lang.Object
org.ErrorMsg
- All Implemented Interfaces:
HelperClass
public class ErrorMsg extends Object implements HelperClass
- Author:
- klukas
-
Constructor Summary
Constructors Constructor Description ErrorMsg()
-
Method Summary
Modifier and Type Method Description static void
addErrorMessage(Exception e)
Adds exception to the global exception list, which is then reported to the user and prepared for reporting.static void
addErrorMessage(String errorMsg)
Adds a errorMessage to a global list.static void
addErrorMessage(Thread t, StackTraceElement[] sf)
static void
addErrorMessage(Throwable t)
static void
addOnAddonLoadingFinishedAction(Runnable runnable)
static void
addOnAppLoadingFinishedAction(Runnable actionListener)
static boolean
areApploadingAndFinishActionsCompleted()
static void
clearErrorMessages()
Removes the current error messages.static Object
findChildComponent(Component c, Class<?> searchClass)
static void
findChildComponents(Component c, Class<?> searchClass, ArrayList<Object> result)
static Object
findParentComponent(Component c, Class<?> searchClass)
static ApplicationStatus
getAppLoadingStatus()
static DecimalFormat
getDecimalFormat(String pattern)
static String[]
getErrorMessages()
Returns pending error messages that were not shown to the user immediately.static String
getErrorMessagesAsXML()
static String[]
getErrorMessagesShort()
static int
getErrorMsgCount()
static String[]
getErrors()
static String
getLastStatusMessage()
static void
setAppLoadingCompleted(ApplicationStatus status)
static void
setRethrowErrorMessages(boolean rethrowErrorMessages)
static void
setStatusMessage(String statusMsg)
-
Constructor Details
-
ErrorMsg
public ErrorMsg()
-
-
Method Details
-
setRethrowErrorMessages
public static void setRethrowErrorMessages(boolean rethrowErrorMessages) -
getDecimalFormat
-
addErrorMessage
Adds a errorMessage to a global list. The error messages can be retrieved withgetErrorMessages
and cleared withclearErrorMessages
.- Parameters:
errorMsg
-
-
addErrorMessage
-
setStatusMessage
-
clearErrorMessages
public static void clearErrorMessages()Removes the current error messages. E.g. after showing them to the user. -
getErrorMessages
Returns pending error messages that were not shown to the user immediately.- Returns:
- Pending Error Messages
-
getErrors
-
getErrorMessagesShort
-
getErrorMessagesAsXML
- Returns:
-
getErrorMsgCount
public static int getErrorMsgCount() -
getLastStatusMessage
-
getAppLoadingStatus
-
setAppLoadingCompleted
-
areApploadingAndFinishActionsCompleted
public static boolean areApploadingAndFinishActionsCompleted() -
addOnAppLoadingFinishedAction
-
findChildComponent
-
findChildComponents
-
findParentComponent
-
addErrorMessage
Adds exception to the global exception list, which is then reported to the user and prepared for reporting. It prints the stack trace, too!- Parameters:
e
- the exception
-
addErrorMessage
-
addOnAddonLoadingFinishedAction
-