rivermont / spidy

The simple, easy to use command line web crawler.
GNU General Public License v3.0
334 stars 69 forks source link

No error raised for incorrect input #57

Closed rivermont closed 3 years ago

rivermont commented 6 years ago

Checklist

Expected Behavior

Raise an InputError and then stop the crawler.

Actual Behavior

No output, just exits straight to console.

Steps to Reproduce the Problem

  1. Run crawler
  2. Choose 'No' to config file.
  3. Type incorrect type of input

Specifications

rivergillis commented 6 years ago

I can start working on this.

rivergillis commented 6 years ago

A SyntaxError is already raised from the incorrect response via handle_invalid_input(), should the InputError replace this?

rivermont commented 6 years ago

@rivergillis Sure! That'd be great, thanks.

rivermont commented 3 years ago

So the problem is that SyntaxError is raised in handle_invalid_input, it's caught by the blanket except Exception: line at crawler.py#L1189 which is a problem.

Instead of changing the error that is raised, I'm just going to have the input loop until user gives an accepted input. No need to make them go through all the settings if they mistype on the last entry.