Added basic error handling.

Try a stupid query!