Handle exceptions on invalid query

Added try/catch block and called done to nicely return exception to user.

Fixes #13 

~~Don't merge yet. Tests are on its way.~~

Done. Tests were already failing, but added tests pass.