Index: modules/simpletest/drupal_web_test_case.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/drupal_web_test_case.php,v
retrieving revision 1.27
diff -u -r1.27 drupal_web_test_case.php
--- modules/simpletest/drupal_web_test_case.php	18 Jul 2008 07:30:34 -0000	1.27
+++ modules/simpletest/drupal_web_test_case.php	10 Aug 2008 16:33:59 -0000
@@ -271,7 +271,18 @@
       // If the current method starts with "test", run it - it's a test.
       if (strtolower(substr($method, 0, 4)) == 'test') {
         $this->setUp();
-        $this->$method();
+        try {
+          $this->$method();
+        }
+        catch (Exception $e) {
+          $backtrace = $e->getTrace();
+          foreach ($backtrace as $function) {
+            if (substr($function['function'], 0, 6) != 'assert' && $function['function'] != 'pass' && $function['function'] != 'fail') {
+              break;
+            }
+          }
+          $this->_assert('exception', $e->getMessage(), 'Other', $function);
+        }
         // Finish up.
         $this->tearDown();
       }
