improved exception on generation failure
fixed exception
Merge pull request #321 from digitalkaoz/error_message_improvement

improved exception on generation failure