Documentation

HandleFault

void
public function HandleFault(
 Exception exception
);

This method is called by the runtime when an error occurs during activity execution. This method can be re-defined, if in case of the activity execution error, any code must be executed. Be default, this method does nothing and can be re-defined in the descendant class.

Method parameters

ParameterDescription
exceptionObject of Exception type, representing the execution error

Examples

<?
public function HandleFault(Exception $exception)
{
if ($exception == null)
throw new Exception("exception");
$status = $this->Cancel();
if ($status == CBPActivityExecutionStatus::Canceling)
return CBPActivityExecutionStatus::Faulting;
return $status;
}
?>


© «Bitrix24», 2001-2024
Up