You are here

public function SalesforceExceptionEvent::getMessage in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 src/Event/SalesforceExceptionEvent.php \Drupal\salesforce\Event\SalesforceExceptionEvent::getMessage()
  2. 5.0.x src/Event/SalesforceExceptionEvent.php \Drupal\salesforce\Event\SalesforceExceptionEvent::getMessage()

Getter for message string.

Return value

string The message for this event, or a default message.

Overrides SalesforceExceptionEventInterface::getMessage

File

src/Event/SalesforceExceptionEvent.php, line 74

Class

SalesforceExceptionEvent
Base class for Salesforce Exception events, primarily for logging.

Namespace

Drupal\salesforce\Event

Code

public function getMessage() {
  if ($this->message) {
    return $this->message;
  }
  elseif ($this->exception && $this->exception
    ->getMessage()) {
    return $this->exception
      ->getMessage();
  }
  else {
    return 'Unknown Salesforce event.';
  }
}