You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Johnny Cass <jo...@epiuse.com> on 2001/04/21 09:48:37 UTC

Re: cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/screens/html Error.vm

Here's the patch for the Error.vm template I'm using at the moment. It's
(exactly?) the same as it's jsp counterpart and displays a bit more
information than the current Error.vm. Maybe somebody will find it
useful.

Index: Error.vm
===================================================================
RCS file:
/home/cvspublic/jakarta-jetspeed/webapp/WEB-INF/templates/vm/screens/html/Error.vm,v
retrieving revision 1.2
diff -u -r1.2 Error.vm
--- Error.vm	2001/04/19 23:21:15	1.2
+++ Error.vm	2001/04/21 07:42:13
@@ -1,18 +1,68 @@
-$page.setTitle("Error")
+<table border=1 cellpadding="5"> 
 
-$page.setBgColor("#ffffff")
+  #* Error Message *#
+  <tr> 
+    <td>
+      <br>
+      <h2>There has been an Error!</h2>
+      Reason:
+      <pre>
+        $!data.stackTraceException.toString()
+      </pre>
+    </td>
+  </tr> 
+
+  #* HTTP Parameters *#
+  #set ( $keys = $data.getParameters().keys() )
+  #if ( $keys )
+    <tr> 
+      <td>
+        <br>
+        <h3>Get/Post Data:</h3>
+        <table border=0>           
+          #foreach ( $key in $keys )                      
+            <tr>
+              <td><b> $key </b></td>
+              <td> = $data.getParameters().getString( $key )</td>
+            <tr>
+          #end          
+        </table>
+      </td> 
+    </tr> 
+  #end
+
+  #* Debug Keys *#
+  #set ( $keys = $data.getVarDebug().keys() )
+  #if ( $keys )
+    #if ( $keys.hasMoreElements() )
+      <tr> 
+        <td>
+          <br>
+          <h3>Debugging Data:</h3>
+          <table border=0> 
+            #foreach ( $key in $keys )            
+              <tr>
+                <td><b> $key </b></td>
+                <td> = $data.getVarDebug().get( $key ) </td>
+              <tr>
+            #end
+          </table>
+        </td> 
+      </tr> 
+    #end
+  #end
+
+  #* Stacktrace *#
+  #if ( $data.getStackTrace() )
+    <tr> 
+      <td>
+        <br>
+        <h3>Stacktrace:</h3>
+        <pre>      
+          $data.getStackTrace()      
+        </pre>
+      </td> 
+    </tr>
+  #end
 
-<font face="verdana,geneva,helvetica">
-
-<h2>Error</h2>
-
-#if( $data.getMessage() )
-
-    Message: <br>$data.getMessage() <br><br>
-    StackTrace: <br>$data.getStackTrace() <br>
-
-#end
-
-</font>
-
-<br>
+</table>
\ No newline at end of file

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org