Not sure if this suits your use case, but if you just want to see the errors more easily, you can install the plugin "JavaScript Errors Notifier".
I've been using it to make sure I notice any errors and it's working well. It's also available for Firefox.
If you actually need them in a div for all users without plugins, j's answer is best.