rubberduck-vba / RubberduckWeb

Project Website for the Rubberduck VBA Editor Add-In
19 stars 12 forks source link

Assert Exception Thrown? #81

Closed BluejacketScott closed 3 years ago

BluejacketScott commented 3 years ago

Gosh, I could SWEAR I saw that I can check for custom exceptions but for the life of me, I can't find the docs. Is this possible or am I confusing RD with another test framework?

BluejacketScott commented 3 years ago

Trial and error - I found it:

TestFail:
    If Err.Number <> <<Custom Error Number>> Then
        Assert.Fail "Test raised an error: #" & Err.Number & " - " & Err.Description
    End If