return;
} } // Determine possible directories of error views
$addPath =
($request instanceof IncomingRequest ? 'html' : 'cli'
) . DIRECTORY_SEPARATOR;
$path =
$this->viewPath .
$addPath;
$altPath =
rtrim((new Paths())->viewDirectory, '\\/ '
) . DIRECTORY_SEPARATOR . 'errors' . DIRECTORY_SEPARATOR .
$addPath;
// Determine the views
$view =
$this->
determineView($exception,
$path);
$altView =
$this->
determineView($exception,
$altPath);
// Check if the view exists
$viewFile = null;
if (is_file($path .
$view)) { $viewFile =
$path .
$view;
} elseif (is_file($altPath .
$altView)) { $viewFile =
$altPath .
$altView;
} // Displays the HTML or CLI error code.