protected function fail($message): void
    {
        if (is_string($message)) {
            $message = new RuntimeException($message);
        }
        $this->errors[] = $message->getMessage();
        throw $message;
    }
protected function fail($message): void
    {
        if (is_string($message)) {
            $message = new RuntimeException($message);
        }
        $this->errors[] = $message->getMessage();
        throw $message;
    }
protected function fail ( $ message ) : void { if ( is_string ( $ message ) ) { $ message = new RuntimeException ( $ message ) ; } $ this -> errors [ ] = $ message -> getMessage ( ) ; throw $ message ; }
Fail execution with a given error

* Adds error to the list of errors
* Throws an exception with the error message

@todo Switch to Throwable once the move to PHP 7 is complete
@throws \RuntimeException if error message given as a string
@param string|\Exception $message Error message or exception
@return void
Fail execution with a given error