Example #1
0
 /**
  * @param \AMQPException $e
  * @return AmqpException
  */
 public static function fromAmqpExtension(\AMQPException $e)
 {
     // parse error code, see: https://github.com/pdezwart/php-amqp/issues/243
     $matches = [];
     preg_match('/^.+: (\\d+), message:.+/', $e->getMessage(), $matches);
     $code = $matches[1] ?? 0;
     return new static($e->getMessage(), (int) $code, $e);
 }
Example #2
0
 public function __construct($reply_code, $reply_text, $method_sig)
 {
     parent::__construct($reply_code, $reply_text, $method_sig);
 }