[embjopr-commits] EMBJOPR SVN: r333 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/exceptions.
embjopr-commits at lists.jboss.org
embjopr-commits at lists.jboss.org
Fri Apr 24 13:54:27 EDT 2009
Author: ozizka at redhat.com
Date: 2009-04-24 13:54:27 -0400 (Fri, 24 Apr 2009)
New Revision: 333
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/exceptions/EmbJoprTestException.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/exceptions/HtmlElementNotFoundException.java
Log:
Optional page dump upon a throw moved from HtmlElementNotFoundException to EmbJoprTestException.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/exceptions/EmbJoprTestException.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/exceptions/EmbJoprTestException.java 2009-04-24 16:46:46 UTC (rev 332)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/exceptions/EmbJoprTestException.java 2009-04-24 17:54:27 UTC (rev 333)
@@ -22,7 +22,10 @@
package org.jboss.jopr.jsfunit.exceptions;
+import org.jboss.jopr.jsfunit.DebugUtils;
+import org.jboss.jopr.jsfunit.EmbjoprTestCase;
+
/**
* Root Exception for Exceptions thrown in Embedded Jopr tests.
* Used to distinguish "expected" exceptions from those unhandled / unexpected.
@@ -35,6 +38,21 @@
super(cause);
}
+ /** Writes the current page to a file named "<testName>-ElNotFound.html". */
+ public EmbJoprTestException(String message, EmbjoprTestCase test)
+ /*throws FileNotFoundException, IOException*/
+ {
+ super(message);
+
+ if( null == test ) return;
+
+ try {
+ DebugUtils.writeFile("target/"+test.getName() + "-ElmNotFoundEx.html", test.getClient().getPageAsText());
+ } catch (Throwable ex) {
+ // ...
+ }
+ }
+
public EmbJoprTestException(String message, Throwable cause) {
super(message, cause);
}
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/exceptions/HtmlElementNotFoundException.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/exceptions/HtmlElementNotFoundException.java 2009-04-24 16:46:46 UTC (rev 332)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/exceptions/HtmlElementNotFoundException.java 2009-04-24 17:54:27 UTC (rev 333)
@@ -17,18 +17,8 @@
}
/** Writes the current page to a file named "<testName>-ElNotFound.html". */
- public HtmlElementNotFoundException(String message, EmbjoprTestCase test)
- /*throws FileNotFoundException, IOException*/
- {
- super(message);
-
- if( null == test ) return;
-
- try {
- DebugUtils.writeFile("target/"+test.getName() + "-ElmNotFoundEx.html", test.getClient().getPageAsText());
- } catch (Throwable ex) {
- // ...
- }
+ public HtmlElementNotFoundException(String message, EmbjoprTestCase test){
+ super(message, test);
}
public HtmlElementNotFoundException(String message, Throwable cause) {
More information about the embjopr-commits
mailing list