VB027
Body falls through into error handler
Visual Basic 6
Error
VB6
Without an Exit Sub above the handler label, the successful path runs straight into the error handling — one of the most common real bugs in VB6
without an Exit Sub above the handler label, the successful path runs straight into the error handling — one of the most common real bugs in VB6.
Why this severity
without an Exit Sub above the handler label, the successful path runs straight into the error handling — one of the most common real bugs in VB6.
Known false positives
handlers that deliberately double as shared cleanup, though that design earns the flag.
Remediation example
Exit Sub
ErrHandler:
MsgBox Err.Description