stdVBA
stdVBA copied to clipboard
`stdError` wrapping - duplicate errors.
A common technique is:
if someCondition then Err.Raise 1, "", "..."
This is because Err.Raise will automatically jump up the stack to the handler. However when we change this to:
if someCondition then stdErr.Raise "..."
This won't necessarily jump up the stack to the handler (especially in codebases that log instead of throwing altogether). It would be valuable to change all these to:
if someCondition then
stdError.Raise "..."
Exit Sub/Exit Function/Exit Property
End if