From a3d20d7745b5619dfd685665a4bc87c5cf4c1758 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 25 Mar 2022 20:39:00 -0700 Subject: [PATCH] Construct new errors --- js/esptool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/esptool.js b/js/esptool.js index 0fccce0..758700a 100644 --- a/js/esptool.js +++ b/js/esptool.js @@ -1018,10 +1018,10 @@ class EspLoader { } setDataLengths = setDataLengths.bind(this); if (readBits > 32) { - throw FatalError("Reading more than 32 bits back from a SPI flash operation is unsupported") + throw new FatalError("Reading more than 32 bits back from a SPI flash operation is unsupported") } if (data.length > 64) { - throw FatalError("Writing more than 64 bytes of data with one SPI command is unsupported") + throw new FatalError("Writing more than 64 bytes of data with one SPI command is unsupported") } let dataBits = data.length * 8 @@ -1066,7 +1066,7 @@ class EspLoader { return } } - throw FatalError("SPI command did not complete in time") + throw new FatalError("SPI command did not complete in time") } waitDone = waitDone.bind(this); await waitDone();