我知道在下面的示例中,应该使用Resume语句而不是Goto语句.
Sub Method()
On Error Goto ErrorHandler
...
CleanUp:
...
Exit Function
ErrorHandler:
Log error etc
Err.Clear 'Is this line actually necessary?'
Resume CleanUp 'SHOULD USE THIS'
Goto CleanUp 'SHOULD NOT USE THIS'
End Sub
Run Code Online (Sandbox Code Playgroud)
我的问题是两者的执行有什么区别?