leafchat.core.api
Class ErrorMsg

java.lang.Object
  extended by leafchat.core.api.Msg
      extended by leafchat.core.api.ErrorMsg

public class ErrorMsg
extends Msg

Sent when an error has occurred and should be reported to the user. Normally handled to display a dialog box.


Field Summary
static MessageInfo info
          Message info
 
Fields inherited from class leafchat.core.api.Msg
PRIORITY_AFTERNORMAL, PRIORITY_BEFORENORMAL, PRIORITY_EARLY, PRIORITY_FIRST, PRIORITY_LAST, PRIORITY_LATE, PRIORITY_NORMAL
 
Method Summary
 java.lang.Throwable getException()
           
 java.lang.String getMessage()
           
 boolean isHandled()
           
 void markHandled()
          Call once message has been displayed to user.
static void report(java.lang.String message, java.lang.Throwable t)
          This method can be called directly to report errors to the user.
 
Methods inherited from class leafchat.core.api.Msg
isStopped, markStopped, sequenceBefore, setSequence, setSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

info

public static MessageInfo info
Message info

Method Detail

report

public static void report(java.lang.String message,
                          java.lang.Throwable t)
This method can be called directly to report errors to the user. It usually results in a dialog box appearing with details.

Parameters:
message - Text of message (may be null)
t - Exception (may be null)

getMessage

public java.lang.String getMessage()
Returns:
Message text or null if none

getException

public java.lang.Throwable getException()
Returns:
Exception or null if none

isHandled

public boolean isHandled()
Overrides:
isHandled in class Msg
Returns:
True if message has already been displayed to user and shouldn't be shown again.

markHandled

public void markHandled()
Call once message has been displayed to user.

Overrides:
markHandled in class Msg


Copyright © 2011 Samuel Marshall. All rights reserved.