protected function fail($error = '')
    {
        $this->isFinished = true;
        $this->isSuccess = false;
        $this->error = $error;
    }
protected function fail($error = '')
    {
        $this->isFinished = true;
        $this->isSuccess = false;
        $this->error = $error;
    }
protected function fail ( $ error = '' ) { $ this -> isFinished = true ; $ this -> isSuccess = false ; $ this -> error = $ error ; }
Marks the flow as failed and sets the error message.

@param string $error
Marks the flow as failed and sets the error message .