فهرست منبع

Merge pull request #6683 from sebavan/master

error pg
sebavan 6 سال پیش
والد
کامیت
7184c1cce2
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  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);
+    })
 }