public function Transaction::getResultCode in Transaction 8
Gets the execution result code.
Positive integer means that the execution was successful:
- 1: generic code for successful execution, - > 1: transactor specific successful execution result code.
Negative integer means that there were errors trying to execute the transaction:
- -1: generic code for failed execution, - < -1: transactor specific failed execution result code
Errors can be recoverable or fatal. If transaction is still pending execution, there was a recoverable error and the execution can be retried. If transaction is in executed state, there was a fatal error and the execution cannot be retried.
Return value
int The result code. FALSE if transaction execution was never called.
Overrides TransactionInterface::getResultCode
See also
\Drupal\transaction\TransactorPluginInterface::RESULT_OK
\Drupal\transaction\TransactorPluginInterface::RESULT_ERROR
File
- src/
Entity/ Transaction.php, line 379
Class
- Transaction
- Provides the transaction content entity.
Namespace
Drupal\transaction\EntityCode
public function getResultCode() {
return $this
->get('result_code')->value ?: FALSE;
}