#2661

Updated the code to show detailed error message.

Please check.