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 voidaddErrorMessage(Exception e)Adds exception to the global exception list, which is then reported to the user and prepared for reporting.static voidaddErrorMessage(String errorMsg)Adds a errorMessage to a global list.static voidaddErrorMessage(Thread t, StackTraceElement[] sf)static voidaddErrorMessage(Throwable t)static voidaddOnAddonLoadingFinishedAction(Runnable runnable)static voidaddOnAppLoadingFinishedAction(Runnable actionListener)static booleanareApploadingAndFinishActionsCompleted()static voidclearErrorMessages()Removes the current error messages.static ObjectfindChildComponent(Component c, Class<?> searchClass)static voidfindChildComponents(Component c, Class<?> searchClass, ArrayList<Object> result)static ObjectfindParentComponent(Component c, Class<?> searchClass)static ApplicationStatusgetAppLoadingStatus()static DecimalFormatgetDecimalFormat(String pattern)static String[]getErrorMessages()Returns pending error messages that were not shown to the user immediately.static StringgetErrorMessagesAsXML()static String[]getErrorMessagesShort()static intgetErrorMsgCount()static String[]getErrors()static StringgetLastStatusMessage()static voidsetAppLoadingCompleted(ApplicationStatus status)static voidsetRethrowErrorMessages(boolean rethrowErrorMessages)static voidsetStatusMessage(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 withgetErrorMessagesand 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
-