Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.share.util
Class DebugUtils

java.lang.Object
  |
  +--oracle.cabo.share.util.DebugUtils

public class DebugUtils
extends java.lang.Object

Debugging utilities.


Method Summary
static javax.servlet.ServletException createServletException(java.lang.String message, java.lang.Throwable rootCause)
          Creates a ServletException, using a constructor that preserves the rootCause if that constructor is available.
static java.lang.Throwable getRootCause(java.lang.Throwable t)
          Given a Throwable, attempts to find the Throwable that caused it.
static java.lang.String getStackTraceAsHTMLString(java.lang.Throwable t, int maxLines)
          Converts a Throwable into a String with embedded HTML markup.
static java.lang.String getStackTraceAsHTMLString(java.lang.Throwable t, int maxLines, java.util.Locale locale)
          Converts a Throwable into a String with embedded HTML markup.
static java.lang.String getStackTraceAsString(java.lang.Throwable t)
          Converts a Throwable into a String.
static java.lang.String getStackTraceAsString(java.lang.Throwable t, java.util.Locale locale)
          Converts a Throwable into a String.
static void sendHttpError(javax.servlet.http.HttpServletResponse response, java.lang.Throwable t)
          Sends an HTTP error response for the Throwable.
static java.lang.String toString(java.lang.Throwable t, java.util.Locale locale)
          Returns a localized version of Throwable.toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createServletException

public static javax.servlet.ServletException createServletException(java.lang.String message,
                                                                    java.lang.Throwable rootCause)
Creates a ServletException, using a constructor that preserves the rootCause if that constructor is available.

getRootCause

public static java.lang.Throwable getRootCause(java.lang.Throwable t)
Given a Throwable, attempts to find the Throwable that caused it. Returns null if no root cause can be found. This function does not recurse on the root cause.

getStackTraceAsString

public static java.lang.String getStackTraceAsString(java.lang.Throwable t,
                                                     java.util.Locale locale)
Converts a Throwable into a String.

toString

public static java.lang.String toString(java.lang.Throwable t,
                                        java.util.Locale locale)
Returns a localized version of Throwable.toString().

getStackTraceAsString

public static java.lang.String getStackTraceAsString(java.lang.Throwable t)
Converts a Throwable into a String.

getStackTraceAsHTMLString

public static java.lang.String getStackTraceAsHTMLString(java.lang.Throwable t,
                                                         int maxLines,
                                                         java.util.Locale locale)
Converts a Throwable into a String with embedded HTML markup.

getStackTraceAsHTMLString

public static java.lang.String getStackTraceAsHTMLString(java.lang.Throwable t,
                                                         int maxLines)
Converts a Throwable into a String with embedded HTML markup.

sendHttpError

public static void sendHttpError(javax.servlet.http.HttpServletResponse response,
                                 java.lang.Throwable t)
                          throws java.io.IOException
Sends an HTTP error response for the Throwable. Useful for debugging purposes, not production code - a real application should send more useful HTML.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.