站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.6 API 英文版文档

ErrorResponse - JBOSS Portal 2.6 API 英文版文档


org.jboss.portal.portlet.invocation.response
Class ErrorResponse

java.lang.Object
  extended byorg.jboss.portal.portlet.invocation.response.PortletInvocationResponse
      extended byorg.jboss.portal.portlet.invocation.response.ErrorResponse
Direct Known Subclasses:
SecurityErrorResponse

public class ErrorResponse
extends PortletInvocationResponse

Application level error.

Version:
$Revision: 5448 $
Author:
Julien Viet

Field Summary
private  java.lang.String message
          There must be one error message.
private  java.lang.Throwable throwable
          The logged throwable if any.
 
Constructor Summary
ErrorResponse(java.lang.String message)
           
ErrorResponse(java.lang.Throwable throwable)
           
 
Method Summary
 java.lang.String getMessage()
          The logged message.
 java.lang.Throwable getThrowable()
          The throwable.
 void logErrorTo(org.jboss.logging.Logger log, java.lang.String logMessage)
          Logs an error message to the specified logger, using either the message or this ErrorResult's Throwable if available.
 java.lang.String toHTML()
          Provides an HTML description of the error, using either the message or the encapsulated Throwable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

throwable

private final java.lang.Throwable throwable
The logged throwable if any.


message

private final java.lang.String message
There must be one error message.

Constructor Detail

ErrorResponse

public ErrorResponse(java.lang.Throwable throwable)

ErrorResponse

public ErrorResponse(java.lang.String message)
Method Detail

getThrowable

public java.lang.Throwable getThrowable()
The throwable. Can be a null object.


getMessage

public java.lang.String getMessage()
The logged message.


logErrorTo

public void logErrorTo(org.jboss.logging.Logger log,
                       java.lang.String logMessage)
Logs an error message to the specified logger, using either the message or this ErrorResult's Throwable if available.

Parameters:
log -
logMessage -

toHTML

public java.lang.String toHTML()
Provides an HTML description of the error, using either the message or the encapsulated Throwable.

Returns: