diff --git a/scripts/electron_afterSign.js b/scripts/electron_afterSign.js
index 8966ca7f..1f65438d 100644
--- a/scripts/electron_afterSign.js
+++ b/scripts/electron_afterSign.js
@@ -13,7 +13,7 @@ exports.default = async function(context) {
         // from the keychain, so we need to get it from the environment.
         const userId = process.env.NOTARIZE_APPLE_ID;
         if (userId === undefined) {
-            throw new Exception("User ID not found. Set NOTARIZE_APPLE_ID.");
+            throw new Error("User ID not found. Set NOTARIZE_APPLE_ID.");
         }
 
         console.log("Notarising macOS app. This may be some time.");