Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivanov Sergey committed Feb 8, 2018
1 parent 6747b21 commit d69a623
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/StompClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,14 @@ public function send(

$result = true;
try {
if (!$this->getStomp()->send($destination, $body, $headers)) {
throw new Exception('Message does not sended. Headers: ' . implode(', ', $headers));
}
$result = $this->getStomp()->send($destination, $body, $headers);
} catch (Exception $e) {
$result = false;

// Логирование в случае, если установлен логгер
$this->putInLog(LogLevel::ERROR, 'Stomp::send failed.', [
'Message' => $e->getMessage(),
'Code' => $e->getCode(),
'File' => $e->getFile(),
'Line' => $e->getLine()
'headers' => implode(', ', $headers)
]);
}

Expand Down

0 comments on commit d69a623

Please sign in to comment.