chiark / gitweb /
better error handling in js
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Sep 2020 19:24:50 +0000 (20:24 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Sep 2020 19:24:50 +0000 (20:24 +0100)
templates/script.ts

index d32ef39093d87ea1d8d66085b7daa747abfc5f4d..2ee10ea1b7bc81e103d08f6ac478ba9893c3185e 100644 (file)
@@ -616,9 +616,9 @@ function startup() {
       }
       gen = tgen;
     } catch (exc) {
+      var s = exc.toString();
       string_report_error('exception handling update '
-                         + k + ': ' + JSON.stringify(m) + ': ' +
-                         + exc.toString());
+                         + k + ': ' + JSON.stringify(m) + ': ' + s);
     }
   }
   es.addEventListener('commsworking', function(event) {