Wordseer / wordseer

The WordSeer text analysis tool, written in Flask.
http://wordseer.berkeley.edu/
40 stars 16 forks source link

Not found errors in app/uploader #40

Closed keien closed 10 years ago

keien commented 10 years ago

...could be used globally, don't you think? There will definitely be other views that would benefit from handling this kind of error.

We don't have global errors and exceptions yet, so these could be the first to go on there.

keien commented 10 years ago

I just found out that get() doesn't even throw an exception when passed in an invalid ID - it just returns None. This is actually quite convenient because we can just use if object clauses to handle it instead of messily handling exceptions, so we could just not have these not-found errors.

abendebury commented 10 years ago

What kind of views in our application would benefit from it?

keien commented 10 years ago

Ignore my first comment...originally I was saying that instead of having to catch exceptions every time we use get(), we could implement some global way to handle those exceptions. But then I found out that get() doesn't actually throw an exception - it just returns None. So we don't have to worry about it after all.