diff options
Diffstat (limited to 'core/ArchiveProcessor/PluginsArchiver.php')
-rw-r--r-- | core/ArchiveProcessor/PluginsArchiver.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/ArchiveProcessor/PluginsArchiver.php b/core/ArchiveProcessor/PluginsArchiver.php index 4c963e17bc..2b46ea29f6 100644 --- a/core/ArchiveProcessor/PluginsArchiver.php +++ b/core/ArchiveProcessor/PluginsArchiver.php @@ -147,7 +147,12 @@ class PluginsArchiver ); } catch (Exception $e) { $className = get_class($e); - $exception = new $className($e->getMessage() . " - caused by plugin $pluginName", $e->getCode(), $e); + + if ($className === 'PHPUnit_Framework_Exception' || (class_exists('PHPUnit_Framework_Exception', false) && is_subclass_of($className, 'PHPUnit_Framework_Exception'))) { + $exception = new $className($e->getMessage() . " - caused by plugin $pluginName", $e->getCode(), $e->getFile(), $e->getLine(), $e); + } else { + $exception = new $className($e->getMessage() . " - caused by plugin $pluginName", $e->getCode(), $e); + } throw $exception; } |