Example usage for org.apache.wicket.markup MarkupStream toHtmlDebugString

List of usage examples for org.apache.wicket.markup MarkupStream toHtmlDebugString

Introduction

In this page you can find the example usage for org.apache.wicket.markup MarkupStream toHtmlDebugString.

Prototype

public String toHtmlDebugString() 

Source Link

Usage

From source file:eu.uqasar.web.pages.errors.ErrorPage.java

License:Apache License

private String getMarkUp(final Throwable throwable) {
    String resource = "";
    String markup = "";
    MarkupStream markupStream;
    if (throwable instanceof MarkupException) {
        markupStream = ((MarkupException) throwable).getMarkupStream();

        if (markupStream != null) {
            markup = markupStream.toHtmlDebugString();
            resource = markupStream.getResource().toString();
        }//  ww  w  . j av  a2s .c  o  m
    }
    String markupStr = "Resource: " + (resource.isEmpty() ? "[No Resource]" : resource);
    markupStr += "\nMarkup: " + (markup.isEmpty() ? "[No Markup]" : markup);
    return markupStr;
}