Beispiel #1
0
 public function testConstructionWithPearErrorYieldsCodeFromPearError()
 {
     require_once __DIR__ . '/Stub/PearError.php';
     $p = new Horde_Exception_Stub_PearError('pear', 666);
     $e = new Horde_Exception_Wrapped($p);
     $this->assertSame(666, $e->getCode());
 }
Beispiel #2
0
 /**
  * Constructor.
  *
  * @param string $message  Error message.
  * @param integer $code    Error reason.
  * @param string $app      Application being pushed.
  */
 public function __construct($message, $code, $app)
 {
     $this->application = $app;
     parent::__construct($message, $code);
 }
Beispiel #3
0
 /**
  * Constructor.
  *
  * @param string $message  Error message (non-translated).
  * @param code $code       Error code.
  */
 public function __construct($message = null, $code = null)
 {
     parent::__construct($message, $code);
     $this->raw_msg = $this->message;
     try {
         $this->message = Horde_Imap_Client_Translation::t($this->message);
     } catch (Horde_Translation_Exception $e) {
     }
 }
Beispiel #4
0
 /**
  * Constructor.
  *
  * @param string $msg  Error message (non-translated).
  * @param code $code   Error code.
  */
 public function __construct($message = null, $code = null)
 {
     parent::__construct($message, $code);
     $this->raw_msg = $this->message;
     $this->message = Horde_Imap_Client_Translation::t($this->message);
 }