]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Throw correct Error object
authorPierre Ossman <ossman@cendio.se>
Fri, 15 Feb 2019 12:01:28 +0000 (13:01 +0100)
committerPierre Ossman <ossman@cendio.se>
Fri, 15 Feb 2019 12:01:28 +0000 (13:01 +0100)
We've already defined the name Error as a logging function, so we
need to be more explicit when we want to refer to the exception
class.

core/util/logging.js

index 036a7dd2ea24a793ca7c1b7e01ff765c81ce489a..4c8943d005460835fb5f11dfaec11a394af2c68d 100644 (file)
@@ -40,7 +40,7 @@ export function init_logging(level) {
             case 'none':
                 break;
             default:
-                throw new Error("invalid logging type '" + level + "'");
+                throw new window.Error("invalid logging type '" + level + "'");
         }
         /* eslint-enable no-console, no-fallthrough */
     }