Added proper stack trace when error thrown and handled one error.