1: <?php
2: /**
3: * This class converts PEAR errors into exceptions for the Kolab_Storage
4: * package.
5: *
6: * PHP version 5
7: *
8: * @category Horde
9: * @package Kolab_Storage
10: * @author Gunnar Wrobel <wrobel@pardus.de>
11: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
12: * @link http://pear.horde.org/index.php?package=Kolab_Storage
13: */
14:
15: /**
16: * This class converts PEAR errors into exceptions for the Kolab_Storage
17: * package.
18: *
19: * Copyright 2010-2012 Horde LLC (http://www.horde.org/)
20: *
21: * See the enclosed file COPYING for license information (LGPL). If you
22: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
23: *
24: * @category Horde
25: * @package Kolab_Storage
26: * @author Gunnar Wrobel <wrobel@pardus.de>
27: * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
28: * @link http://pear.horde.org/index.php?package=Kolab_Storage
29: */
30: class Horde_Kolab_Storage_Exception_Pear
31: extends Horde_Exception_Pear
32: {
33: /**
34: * Exception handling.
35: *
36: * @param mixed $result The result to be checked for a PEAR_Error.
37: *
38: * @return mixed Returns the original result if it was no PEAR_Error.
39: *
40: * @throws Horde_Exception_Pear In case the result was a PEAR_Error.
41: */
42: static public function catchError($result)
43: {
44: self::$_class = __CLASS__;
45: return parent::catchError($result);
46: }
47: }
48: