Added exception handling in sqlGeneratorTests