Update error-reporting.js

Added method to log all errors that are not immediately handled in promises