function devel_demonstrate_error_handlers

Demonstrates the active error handler.

Generates some warnings or errors so that the reaction of the current error handler can be observed.

Parameters

$severity: The severity level that the error handler should demonstrate.

1 call to devel_demonstrate_error_handlers()
devel_admin_settings in ./devel.admin.inc
Form constructor for the settings form.

File

./devel.admin.inc, line 185

Code

function devel_demonstrate_error_handlers($severity) {
    switch ($severity) {
        case 'warning':
            $undefined = $undefined;
            1 / 0;
            break;
        case 'error':
            $undefined = $undefined;
            1 / 0;
            devel_undefined_function();
            break;
    }
}