Explorar o código

Merge pull request #6683 from sebavan/master

error pg
sebavan %!s(int64=6) %!d(string=hai) anos
pai
achega
7184c1cce2
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      Playground/js/indexWebGPU.js

+ 6 - 1
Playground/js/indexWebGPU.js

@@ -4,7 +4,12 @@ var monacoMode = "javascript";
 
 function getRunCode(jsEditor, callBack) {
     var code = jsEditor.getValue();
-    callBack(code);
+    callBack(code).catch((e) => {
+        showError(e);
+
+        // Also log error in console to help debug playgrounds
+        console.error(e);
+    })
 }