add console to display errors and console message only if use of "exception" event