Hide unexpected errors from users.

1) Hide unexpected errors from users.
2) Logs the errors on console instead.
3) The errors are not hidden if developer mode is on.
(#2352)

@devoncarew