Errors.getMessage: properly handle UncaughtErrorEvents

Also, make sure we never return an empty string.