All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nakedobjects.plugins.htmlviewer.html.ErrorMessage Maven / Gradle / Ivy

The newest version!
package org.nakedobjects.plugins.htmlviewer.html;

import java.io.PrintWriter;

import org.nakedobjects.plugins.htmlviewer.component.Component;


public class ErrorMessage implements Component {

    private final Exception e;
    private final boolean isDebug;

    public ErrorMessage(final Exception e, final boolean isDebug) {
        this.e = e;
        this.isDebug = isDebug;
    }

    public void write(final PrintWriter writer) {
        writer.println("
"); writer.println(e.getMessage()); writer.println("
"); if (isDebug) { writer.println("
");
            e.printStackTrace(writer);
            writer.println("
"); } } } // Copyright (c) Naked Objects Group Ltd.




© 2015 - 2025 Weber Informatics LLC | Privacy Policy