瀏覽代碼

Catch errors in example.

painor 3 年之前
父節點
當前提交
afecdb787b
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      examples/simpleLogin.js

+ 5 - 1
examples/simpleLogin.js

@@ -76,4 +76,8 @@ client
       "%c you can save it to login with it next time",
       "color:#B54128"
     );
-  });
+  }).catch((e)=>{
+    console.log("AN ERROR HAS HAPPENED");
+    console.log(e.toString());
+
+});