2006/unicorn/src/org/w3c/unicorn/util Message.java,1.1,1.2

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util
In directory hutz:/tmp/cvs-serv26594/src/org/w3c/unicorn/util

Modified Files:
	Message.java 
Log Message:
added constructor Message(Exception)

Index: Message.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/Message.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Message.java	31 Aug 2009 15:00:15 -0000	1.1
+++ Message.java	8 Sep 2009 14:55:54 -0000	1.2
@@ -15,6 +15,15 @@
 	public Message() {
 	}
 	
+	public Message(Exception e) {
+		content = e.getMessage() + "\n";
+		for (StackTraceElement stackTraceElement : e.getStackTrace()) {
+			content += stackTraceElement.toString() + "\n";
+		}
+		level = Level.ERROR;
+		message = "$stack_trace_text";
+	}
+	
 	public Message(Level level, String message, String content) {
 		this.level = level;
 		this.message = message;

Received on Tuesday, 8 September 2009 14:56:08 UTC