| @@ -22,11 +22,8 @@ | ||
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | 24 | namespace AcyMailing\Libraries\Imap2\Roundcube; |
| 25 | 25 | |
| 26 | -use AcyMailing\Libraries\Imap2\ErrorException; | |
| 27 | -use AcyMailing\Libraries\Imap2\rcube; | |
| 28 | - | |
| 29 | 26 | /** |
| 30 | 27 | * Character sets conversion functionality |
| 31 | 28 | * |
| 32 | 29 | * @package Framework |
| @@ -183,9 +180,9 @@ | ||
| 183 | 180 | * @param string $errstr Error message |
| 184 | 181 | */ |
| 185 | 182 | public static function error_handler($errno, $errstr) |
| 186 | 183 | { |
| 187 | - throw new ErrorException($errstr, 0, $errno); | |
| 184 | + throw new \Exception($errstr, 0, $errno); | |
| 188 | 185 | } |
| 189 | 186 | |
| 190 | 187 | /** |
| 191 | 188 | * Parse and validate charset name string. |
| @@ -322,9 +319,9 @@ | ||
| 322 | 319 | // it means that input string has been truncated |
| 323 | 320 | #set_error_handler(array('rcube_charset', 'error_handler'), E_NOTICE); |
| 324 | 321 | try { |
| 325 | 322 | $out = iconv($from, $to.$iconv_options, $str); |
| 326 | - } catch (ErrorException $e) { | |
| 323 | + } catch (\Exception $e) { | |
| 327 | 324 | $out = false; |
| 328 | 325 | } |
| 329 | 326 | #restore_error_handler(); |
| 330 | 327 | |
| @@ -355,9 +352,9 @@ | ||
| 355 | 352 | // using mb_check_encoding() is much slower |
| 356 | 353 | #set_error_handler(array('rcube_charset', 'error_handler'), E_WARNING); |
| 357 | 354 | try { |
| 358 | 355 | $out = mb_convert_encoding($str, $mb_to, $mb_from); |
| 359 | - } catch (ErrorException $e) { | |
| 356 | + } catch (\Exception $e) { | |
| 360 | 357 | $out = false; |
| 361 | 358 | } |
| 362 | 359 | #restore_error_handler(); |
| 363 | 360 | |