check error level in error handler