info.magnolia.rendering.engine
Class ModeDependentRenderExceptionHandler

java.lang.Object
  extended by info.magnolia.rendering.engine.ModeDependentRenderExceptionHandler
All Implemented Interfaces:
RenderExceptionHandler

public class ModeDependentRenderExceptionHandler
extends Object
implements RenderExceptionHandler

Exception handler providing different output based on the configuration of the current instance. Full stacktrace gets rendered on the author instance only, while ignoring the stacktraces in preview mode and on public instances.

Version:
$Id$

Field Summary
static String RENDER_ERROR_MESSAGE_BEGIN
           
static String RENDER_ERROR_MESSAGE_END
           
 
Constructor Summary
ModeDependentRenderExceptionHandler(ServerConfiguration config)
           
 
Method Summary
 void handleException(RenderException renderException, RenderingContext renderingContext)
           
protected  void inEditMode(String msg, RenderException renderException, PrintWriter out)
           
protected  void inPublicMode(String msg, RenderException renderException, PrintWriter out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RENDER_ERROR_MESSAGE_BEGIN

public static final String RENDER_ERROR_MESSAGE_BEGIN
See Also:
Constant Field Values

RENDER_ERROR_MESSAGE_END

public static final String RENDER_ERROR_MESSAGE_END
See Also:
Constant Field Values
Constructor Detail

ModeDependentRenderExceptionHandler

@Inject
public ModeDependentRenderExceptionHandler(ServerConfiguration config)
Method Detail

handleException

public void handleException(RenderException renderException,
                            RenderingContext renderingContext)
Specified by:
handleException in interface RenderExceptionHandler

inPublicMode

protected void inPublicMode(String msg,
                            RenderException renderException,
                            PrintWriter out)

inEditMode

protected void inEditMode(String msg,
                          RenderException renderException,
                          PrintWriter out)


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.