Returns the current error level.
This function should only be used to get the current error level pre DRUPAL_BOOTSTRAP_KERNEL or before Drupal is installed. In all other situations the following code is preferred:
Drupal::config('system.logging')
->get('error_level');
string The current error level.
function _drupal_get_error_level() {
try {
return Drupal::config('system.logging')
->get('error_level');
} catch (Exception $e) {
// During very early install the cache_config table does not exist.
return ERROR_REPORTING_DISPLAY_ALL;
}
}