异常处理,创建日志并在JAVA中继续执行该程序 [英] exception handeling, creating log and continue the program in JAVA
问题描述
如果发生任何异常,那么它应该写在我的文本文件上,其次程序不能停止,它必须继续,直到最后一次迭代完成...
也就是说 - 如果任何迭代的任何部分出现某些错误,那么程序不能在此停止。错误必须在我的结果中以错误的名义提及,它必须继续并更新我的日志文件
重新寻找 try
- catch
block。请参阅本教程。
I am designing a program in JAVA that captures results in about 10 iterations. At the end of these iterations all the results must be written into a log file.
If any exception occurs then it should be written on my text file and secondly the program must not stop, it must go on till the last iteration is completed...
That is to say - if some error occur on any part of any iteration the program must not stop here. The error must be mentioned within my results by the name of error and it must go on and update my log file
You're looking for the try
-catch
block. See, for example, this tutorial.
这篇关于异常处理,创建日志并在JAVA中继续执行该程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!