错误的这个在html的console里也是有的,刚才是看花眼了吗

news/2024/7/23 19:33:21 标签: javascript
javascript"><!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
	</head>
	<body>
		
	
	    
		<script>
		  async function helloAsync() {
    await new Promise(function (resolve, reject) {
        throw new Error('错误');
    });
}
helloAsync().then(v => console.log(v))
.catch(e => console.log(e.message));
		
		</script>
	</body>
</html>

http://www.niftyadmin.cn/n/957356.html

相关文章

强化学习调参实践

1、如果出现神经网络输出数值很大&#xff0c;而且过快收敛问题&#xff0c;如下 那么有可能是state没有除255。 重新试试 2、ValueError: The parameter probs has invalid values或模型输出nan 模型输入的数据可能为&#xff08;1&#xff0c;N&#xff0c;84&#xff0c;8…

promise的用法,为什么不是运行出3呢?ex是什么意思?

const promise new Promise(function(resolve, reject) {setTimeout(function() {try{let c 6 / 2 ;resolve(c);} catch(ex) {reject(ex);}}, 1000) })不知道怎么debug得出3来。 为啥是underfined&#xff1f; <!DOCTYPE html> <html><head><meta cha…

ray安装踩坑记录

Ray是个复杂的库&#xff0c;安装非常依赖各个包的版本&#xff0c;只要按照时间顺序&#xff0c;逐个安装即可。 坑一&#xff1a; 当前ray的最新版本为1.8.0&#xff0c;对应的cloudpickle为2.0.0&#xff0c;无法执行 ray.init() 报错为typeerror&#xff1a;cant pickl…

【Pytorch异常笔记】Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.

异常描述 OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or c…

zip函数和zip(*)函数

zip() 函数用于将可迭代的对象作为参数&#xff0c;将对象中对应的元素打包成一个个元组&#xff0c;然后返回由这些元组组成的列表。 如果各个迭代器的元素个数不一致&#xff0c;则返回列表长度与最短的对象相同。 zip(*)函数利用 * 号操作符&#xff0c;可以将元组解压为列…

pytorch ray 出现 Windows fatal exception: access violation错误的解决方案(远程主机强迫关闭了一个现有的连接)

训练PPO算法&#xff0c;出现Windows fatal exception: access violation问题。PPO算法是一个多线程算法&#xff0c;为了加速训练&#xff0c;使用GPU和显存加速计算。该问题不能稳定复现。 为了节约现存&#xff0c;PPO的公共参数 储存在内存中&#xff0c;worker数据存储在…

RuntimeError: CUDA error: an illegal instruction was encountered

不是一个能稳定复现的bug&#xff0c;很有可能是显卡坏了&#xff0c;除了换显卡&#xff0c;没有找到解决方法。

用yarn 运行vue项目的命令是

两个 一个yarn 作用是安装yarn 第二个是yarn dev 就可以了 第二个不是yarn serve