/** * Use in your catch() blocks if you think the exception * might have to be thrown further down the stack. * @param Exception $exception * The exception that was thrown. It is analyzed for * whether it should be re-thrown. * @param string $current_class * If the $rethrow_dest_classes was specified in Pie_Exception::add * when creating this exception's class, and it does not contain * $current_class, this function throws the exception again. */ static function rethrow($exception, $current_class) { if (!is_callable(array($exception, 'rethrowDestClasses'))) { return false; } if (!in_array($current_class, $exception->rethrowDestClasses())) { throw $exception; } }