/**
  * Setter accepts a previous Exception. Useful for determining the context
  * of a current exception (ie. detecting recursion).
  *
  * @since Symphony 2.3.2
  * @param Exception $ex
  */
 public static function setException(Exception $ex)
 {
     self::$exception = $ex;
 }