Replies: 1 comment
-
Great question! Yes, your observation is correct. My original approach was to use the Because an While I knew what If DebugMode(True) Then On Error Resume Next Else On Error Resume Next` After a lot of thought and consideration, I finally settled on making this two lines with hopefully a greater level of clarity on what is actually taking place. Less clever and more clear. ' Old way to set On Error Resume Next
If DebugMode(True) Then On Error Resume Next Else On Error Resume Next
' New (preferred) way
LogUnhandledErrors
On Error Resume Next
' Enabling inline debugging remains the same
If DebugMode(True) Then On Error GoTo 0 Else On Error Resume Next Inline debugging is mainly intended for debugging functionality in the add-in where it is useful to jump right to the line causing the error. As we understand more about the specific errors being thrown, we can use the |
Beta Was this translation helpful? Give feedback.
-
I've noticed
DebugMode
andLogUnhandledErrors
are now in their own module, which is good I think. I also noticed that newer functions seem to useLogUnhandledErrors
instead ofDebugMode
, isLogUnhandledErrors
the new preferred mechanism for handling Errors? From reading howDebugMode
seems to work, it simply points toLogUnhandledErrors
, but thought I'd check and see if I'm missing something.Beta Was this translation helpful? Give feedback.
All reactions