[英]How can I capture an error message I throw using the JavaScript block in ElectroNeek Studio Pro
When I use the JavaScript block I want to be able to capture an error message I throw using the red error exit bubble on the JavaScript Activity.当我使用 JavaScript 块时,我希望能够捕获我在 JavaScript 活动上使用红色错误退出气泡抛出的错误消息。 Right now whatever string I put in the throw always comes back as “error”.
现在,无论我在 throw 中放入什么字符串,都会返回为“error”。 I do not find it desireable to save another variable in the block as an error message outside of the throw.
我不认为将块中的另一个变量保存为抛出之外的错误消息是可取的。
enter image description here在此处输入图像描述
I would expect the console log to have the custom error message and not error.我希望控制台日志包含自定义错误消息而不是错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.