01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.html;
04:
05: import java.io.*;
06:
07: public abstract class HtmlElement {
08: public static final String endl = System
09: .getProperty("line.separator");
10:
11: public abstract String html() throws Exception;
12:
13: public String toString() {
14: try {
15: return html();
16: } catch (Exception e) {
17: StringWriter out = new StringWriter();
18: e.printStackTrace(new PrintWriter(out, true));
19: return out.toString();
20: }
21: }
22: }
|