fixing handling of exceptions
Merge pull request #34 from vhalbert/queryplan

fixing handling of exceptions