Implements exception logging for JavaScript errors