Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function fetch(Query $query)
 {
     try {
         $timetamp = DateTime::now();
         $messageId = MessageId::generate();
         $metaData = new MetaData();
         $data = $this->pipe(new DomainQueryMessage($messageId, $timetamp, $query, $metaData));
     } catch (Exception $exception) {
         throw QueryException::create($exception->getMessage(), $exception);
     }
     return $data;
 }
Ejemplo n.º 2
0
 /**
  * Constructs HandlerNotFoundException
  *
  * @param string         $message  The exception message
  * @param int            $code     The exception code
  * @param Exception|null $previous The previous exception for chaining
  */
 public function __construct($message = '', $code = 1122, Exception $previous = null)
 {
     parent::__construct($message, $code, $previous);
 }
Ejemplo n.º 3
0
 public function test_that_create_returns_exception_instance()
 {
     $exception = QueryException::create('Query error');
     $this->assertInstanceOf('Novuso\\Common\\Application\\Messaging\\Query\\Exception\\QueryException', $exception);
 }