[英]In AHK, what is the difference between Try/Catch and OnError()? When to use one or the other?
I am currently writing an AHK script that reads and writes files.我目前正在编写一个读写文件的 AHK 脚本。 I would like to handle the possible I/O errors, but the doc isn't clear to me regarding wether I should use Try/Catch or OnError() .
我想处理可能的 I/O 错误,但我不清楚该文档是否应该使用Try/Catch或OnError() 。
What is the difference between the two ?两者有什么区别? And when to use one or the other ?
什么时候使用一个或另一个?
So, after some more research, here is my understanding:所以,经过一些更多的研究,这是我的理解:
Try/Catch : Use it to:尝试/捕捉:用它来:
OnError() : Use it to OnError() :使用它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.