How to use Stacktrace to return Error Line Number in vb.net

后端 未结 7 1115
名媛妹妹
名媛妹妹 2021-02-05 20:08

I am trying to create some sort of error catching method that will return the error line number. We have an abort email that is sent out when a process aborts that gives us the

7条回答
  •  庸人自扰
    2021-02-05 21:02

    If you wish to remain using On Error Goto then simply copy and paste your code into a programmers editor like UltraEdit and insert all the line numbers in a single column editing operation. Make sure you highlight the first column then use Column/Insert Number...

    Then copy and paste that back into your procedure. Voila except the first case after a select case statement. Remove the line numbers you inserted from the first case entry after every select case.

提交回复
热议问题