By the time you catch an exception, you have no record of where the exception was thrown.
当你捕获到一个异常时,你甚至不知道这个异常是从哪个地方抛出的。
The Update and Delete buttons use exception handlers to display the error message if something goes wrong (such as referential integrity violations when deleting a record).
如果发生错误(例如删除记录时违反了参照完整性),Update和Delete按钮则使用异常处理程序来显示出错消息。
As shown in the code snippet below, this requires keeping a counter so you know when to commit and write a log record, taking care not to count rows that cause an exception.
如下面的代码段所示,这需要维护一个计数器,以便能够知道什么时候进行提交并写日志记录,这个计数器不考虑导致异常的行。
应用推荐