I have the following try/catch statements but when an error occurs, the catch statement doesn\'t catch it.
try { navigator.serviceWorker.register(\'servic