Added error logging for exceptions

I don't care about render errors, I'd take a PR on using the dispatch event constant but I don't have time to test at this moment.