Thomas Bruederli
2012-05-16 76e499e8a1760d1c519a228e13dfdb69fd4c38f7
Also accept PHP exceptions as argument to rcube::raise_error()
1 files modified
12 ■■■■■ changed files
program/include/rcube.php 12 ●●●●● patch | view | raw | blame | history
program/include/rcube.php
@@ -1050,6 +1050,18 @@
     */
    public static function raise_error($arg = array(), $log = false, $terminate = false)
    {
        // handle PHP exceptions
        if (is_object($arg) && is_a($arg, 'Exception')) {
            $err = array(
                'type' => 'php',
                'code' => $arg->getCode(),
                'line' => $arg->getLine(),
                'file' => $arg->getFile(),
                'message' => $arg->getMessage(),
            );
            $arg = $err;
        }
        // installer
        if (class_exists('rcube_install', false)) {
            $rci = rcube_install::get_instance();