|
@@ -7,20 +7,7 @@
|
|
|
<title>Document</title>
|
|
|
</head>
|
|
|
<body>
|
|
|
- <script>
|
|
|
- var p;
|
|
|
- try {
|
|
|
- p = new Promise((res, rej) => {
|
|
|
- // 抛出异常后 会将promise对象 变成失败的状态
|
|
|
- throw new Error('就是这么傲娇.');
|
|
|
- rej('莫名其妙 无理取闹'); // 将promise对象 变成失败的状态
|
|
|
- });
|
|
|
- // .catch((err) => err);
|
|
|
- } catch (error) {
|
|
|
- console.error('走了吗', error);
|
|
|
- }
|
|
|
-
|
|
|
- console.log(p);
|
|
|
- </script>
|
|
|
+ <p>商家端
|
|
|
+ </p>
|
|
|
</body>
|
|
|
</html>
|