Add has_error() to BaseScanner, to easily test if a specific error was found

Will come in handy for unit tests