Browse Source

Merge pull request #6683 from sebavan/master

error pg
sebavan 6 năm trước cách đây
mục cha
commit
7184c1cce2
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  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);
+    })
 }