Permalink
Browse files

Exception stack traces generated inside LimeTest are now hidden

  • Loading branch information...
1 parent 699dbbf commit 7daeab4d4e2d39a72e3e63f21c8f1a07697eb707 bschussek committed Mar 10, 2010
Showing with 13 additions and 0 deletions.
  1. +13 −0 lib/LimeError.php
View
@@ -74,6 +74,19 @@ public static function fromException(Exception $exception, $file = null, $line =
}
}
+ // Remove all the parts from the trace that have been generated inside
+ // the LimeTest object. Like above.
+ if ($exception instanceof LimeConstraintException)
+ {
+ while (count($trace) > 0 && isset($trace[0]['class']) && $trace[0]['class'] == 'LimeTest')
+ {
+ $file = isset($trace[0]['file']) ? $trace[0]['file'] : null;
+ $line = isset($trace[0]['line']) ? $trace[0]['line'] : null;
+
+ array_shift($trace);
+ }
+ }
+
// Remove all the parts from the trace that have been generated in the
// annotation support, the CLI etc. They are irrelevant for the testing
// developer.

0 comments on commit 7daeab4

Please sign in to comment.