sourceoptics / source_optics

Development has moved to BitBucket. Please clone from and send PRs to https://bitbucket.org/laserllama/sourceoptics/src/master/.
http://sourceoptics.io
20 stars 6 forks source link

add typed exceptions to the scanner code #133

Open mpdehaan opened 5 years ago

mpdehaan commented 5 years ago

the processor code has a number of places that raise untyped Exceptions with "raise Exception(...)"

all of these exceptions should be typed so we can catch them and produce human-friendly messages in the main processor loop.

Additionally, when processing more than one repo, we should probably NOT fail the rest of the repos? Or maybe we should, because the failure would go unnoticed otherwise.

The ultimate fix is to really have a 'system health' dashboard in the main UI that shows a history of scans or something like that, though this fix is mostly about just removing tracebacks in error scenarios from user view and replacing them with better explanations.

CommandException could extend from ScannerException, etc, and have code to handle it in the main scanner loop.