完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,我想要捕捉Error变量,但似乎现在有办法做到这一点(希望你们证明我错了!),这就是我所做的:输出@File使用val $(len(WriteString $))&amp
;“一个”; WriteString $ WriteString进入一个文件,但是如果文件无法写入,或者其他一些错误情况我希望将Error变量存储到我的var中。 我知道系统会捕获此错误,但是当它执行时程序会停止。 PS:我需要格式化输出,因为我的字符串超过80个字符长。 以上来自于谷歌翻译 以下为原文 Hello, I want to catch the Error variable, but there seems to be now way to do that (hope you guys prove me wrong!), this is what i do: output @File using val$(len(WriteString$))&"a"; WriteString$ The WriteString goes into a file, but if the file cant be written, or some other error case i want to have the Error variable stored into my var. I know the system traps this error, but when it does the program stops. PS: I need the formatted output because my strings are over 80 chars long. |
|
相关推荐
4个回答
|
|
我发现它:输出@File * ,, Err *使用val $(len(WriteString $))&“a”;
WriteString $但程序仍然停止(我指向一个存在noet的位置..任何想法? 以上来自于谷歌翻译 以下为原文 I found it: output @File *,,Err* using val$(len(WriteString$))&"a"; WriteString$ But the program still stops (i point to a location that does noet exist.. Any ideas? |
|
|
|
sdfdsg 发表于 2019-10-15 08:41 陷入“Err”的错误代码是什么? 来自系统的错误消息是什么? 错误指向哪些行? 输出命令的语法看起来正确。 它可能是一个问题的文件? 以上来自于谷歌翻译 以下为原文 What was the Error code trapped in "Err"? What is the error message from the system? What lines are the error pointing at? The syntax for the output command looks correct. Could it be the file that is an issue? |
|
|
|
对不起,我做了一个编码错误,这行确实按预期工作:输出@File ,, Err使用val $(len(WriteString $))&“a”; WriteString $ Error存储在Err中,程序继续。 所以我可以使用Err进行错误处理。 以上来自于谷歌翻译 以下为原文 Sorry, i made a coding error, this line does work as expected: output @File ,,Err using val$(len(WriteString$))&"a"; WriteString$ Error is stored in Err and program continues. So i can do the error handling using Err. |
|
|
|
sdfdsg 发表于 2019-10-15 09:00 好。 告诉我你是否还需要帮助。 以上来自于谷歌翻译 以下为原文 Ok. Tell me if you still need help. |
|
|
|
只有小组成员才能发言,加入小组>>
2111 浏览 1 评论
1874 浏览 1 评论
1730 浏览 5 评论
2599 浏览 3 评论
将设备连接到PC并通过asic格式读取数据然后我的网络分析仪挂起
1572 浏览 4 评论
524浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
375浏览 0评论
1438浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
285浏览 0评论
2268浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-5-18 09:37 , Processed in 1.166889 second(s), Total 83, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号