/**
  * Error message test
  */
 public function testError()
 {
     $this->assertInternalType('string', Messenger::error('test'));
 }
Beispiel #2
0
 /**
  * Error event emitter
  *
  * @param ConnectionInterface $conn
  * @param \Exception          $e
  * @throws \Sonar\Exceptions\AppServiceException
  */
 public function onError(ConnectionInterface $conn, \Exception $e)
 {
     try {
         throw new \Exception($e->getMessage());
     } catch (\Exception $e) {
         throw new SocketServiceException(Messenger::error($e->getMessage()));
     } finally {
         $conn->close();
     }
 }