src/Execution/ErrorBuffer.php
public function flush(string $errorMessage): void
    {
        if (! $this->hasErrors()) {
            return;
        }

        $exception = $this->resolveException($errorMessage, $this);

        $this->clearErrors();

        throw $exception;
    }
public function flush(string $errorMessage): void
    {
        if (! $this->hasErrors()) {
            return;
        }

        $exception = $this->resolveException($errorMessage, $this);

        $this->clearErrors();

        throw $exception;
    }
public function flush ( string $ errorMessage ) : void { if ( ! $ this -> hasErrors ( ) ) { return ; } $ exception = $ this -> resolveException ( $ errorMessage , $ this ) ; $ this -> clearErrors ( ) ; throw $ exception ; }
Flush the errors.

@param  string  $errorMessage
@return void

@throws \Exception
Flush the errors .