You are here

public function SmsMessageResultInterface::setError in SMS Framework 2.1.x

Same name and namespace in other branches
  1. 8 src/Message/SmsMessageResultInterface.php \Drupal\sms\Message\SmsMessageResultInterface::setError()
  2. 2.x src/Message/SmsMessageResultInterface.php \Drupal\sms\Message\SmsMessageResultInterface::setError()

Sets the error of the message.

Usually a setting an error on a result indicates something went wrong with the entire transaction.

Parameters

string|null $error: A error code from \Drupal\sms\Message\SmsMessageResultError, or NULL if unknown.

Return value

$this Returns this result object for chaining.

2 methods override SmsMessageResultInterface::setError()
SmsMessageResult::setError in src/Message/SmsMessageResult.php
Sets the error of the message.
SmsMessageResult::setError in src/Entity/SmsMessageResult.php
Sets the error of the message.

File

src/Message/SmsMessageResultInterface.php, line 34

Class

SmsMessageResultInterface
Contains information on SMS message results.

Namespace

Drupal\sms\Message

Code

public function setError($error);