com.wewebu.ow.server.util
Class OwExceptionManager

java.lang.Object
  extended by com.wewebu.ow.server.util.OwExceptionManager

public class OwExceptionManager
extends Object

Utility class for displaying exceptions in HTML.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Field Summary
static String OWEXCEPTION_ELEMENT_ID
          the ID of the HTML element that should be open on click
 
Constructor Summary
OwExceptionManager()
           
 
Method Summary
static String getExceptionDisplayText(Throwable e_p)
          display a exception as HTML
static String getLocalizedMessage(Throwable e_p, Locale locale_p)
          Get the localized message from the given exception.
static String getRelevantStackTrace(Throwable e_p)
          Get the relevant stack trace.
static void PrintCatchedException(Locale locale_p, Throwable e_p, PrintWriter w_p, String strStyleClassName_p)
          display a exception as HTML
static void PrintCatchedException(Locale locale_p, Throwable e_p, PrintWriter w_p, String strStyleClassName_p, String elementId_p)
          display an exception as HTML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OWEXCEPTION_ELEMENT_ID

public static final String OWEXCEPTION_ELEMENT_ID
the ID of the HTML element that should be open on click

See Also:
Constant Field Values
Constructor Detail

OwExceptionManager

public OwExceptionManager()
Method Detail

getExceptionDisplayText

public static String getExceptionDisplayText(Throwable e_p)
display a exception as HTML

Parameters:
e_p - Throwable to be displayed

PrintCatchedException

public static void PrintCatchedException(Locale locale_p,
                                         Throwable e_p,
                                         PrintWriter w_p,
                                         String strStyleClassName_p)
display a exception as HTML

Parameters:
locale_p - Locale for localize the messages
e_p - Throwable to be displayed
w_p - Writer for HTML
strStyleClassName_p - style class used to display the error message e.g. OwErrorStack, OwOwWebApplication_EXCEPTION

PrintCatchedException

public static void PrintCatchedException(Locale locale_p,
                                         Throwable e_p,
                                         PrintWriter w_p,
                                         String strStyleClassName_p,
                                         String elementId_p)
display an exception as HTML

Parameters:
locale_p - Locale for localize the messages
e_p - Throwable to be displayed
w_p - Writer for HTML
strStyleClassName_p - style class used to display the error message e.g. OwErrorStack, OwOwWebApplication_EXCEPTION
elementId_p - the ID of the HTML element that should be open on click

getLocalizedMessage

public static String getLocalizedMessage(Throwable e_p,
                                         Locale locale_p)
Get the localized message from the given exception.

Parameters:
e_p - - the Exception
locale_p - - the user Locale object
Returns:
- the localized message.
Since:
3.1.0.0

getRelevantStackTrace

public static String getRelevantStackTrace(Throwable e_p)
Get the relevant stack trace.

Parameters:
e_p - - the exception
Returns:
- a formatted String object, containing the stacktrace.
Since:
3.1.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.