Skip to content
Snippets Groups Projects
Commit f6a336e8 authored by Aaron Bauman's avatar Aaron Bauman Committed by Aaron Bauman
Browse files

Issue #2972602 by AaronBauman, acrosman: Salesforce logs empty, no title

parent ba64ea9a
No related branches found
No related tags found
No related merge requests found
...@@ -65,8 +65,9 @@ class SalesforceLoggerSubscriber implements EventSubscriberInterface { ...@@ -65,8 +65,9 @@ class SalesforceLoggerSubscriber implements EventSubscriberInterface {
if ($exception) { if ($exception) {
$this->logger->log($event->getLevel(), self::EXCEPTION_MESSAGE_PLACEHOLDER, Error::decodeException($exception)); $this->logger->log($event->getLevel(), self::EXCEPTION_MESSAGE_PLACEHOLDER, Error::decodeException($exception));
} }
else {
$this->logger->log($event->getLevel(), $event->getMessage(), $event->getContext()); $this->logger->log($event->getLevel(), $event->getMessage(), $event->getContext());
}
} }
} }
...@@ -72,7 +72,15 @@ abstract class SalesforceExceptionEvent extends SalesforceBaseEvent implements S ...@@ -72,7 +72,15 @@ abstract class SalesforceExceptionEvent extends SalesforceBaseEvent implements S
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getMessage() { public function getMessage() {
return $this->message; if ($this->message) {
return $this->message;
}
elseif ($this->exception && $this->exception->getMessage()) {
return $this->exception->getMessage();
}
else {
return 'Unknown Salesforce event.';
}
} }
/** /**
......
...@@ -28,9 +28,7 @@ interface SalesforceExceptionEventInterface { ...@@ -28,9 +28,7 @@ interface SalesforceExceptionEventInterface {
* Getter for message string. * Getter for message string.
* *
* @return string * @return string
* The formatted message for this event. (Note: to get the Exception * The message for this event, or a default message.
* message, use ::getExceptionMessage()). If no message was given,
* FormattableMarkup will be an empty string.
*/ */
public function getMessage(); public function getMessage();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment