.

Mpx.TestAssertTest

Declaration

 
Sub Mpx.Test.AssertTest()

Description

AssertTest forces an MPX library assertion to occur. This is useful for testing assertion handling code.

The condition used to force the exception is (1 = =2).

Sample Code

The following code calls Mpx.Test.AssertTest which is guaranteed to assert. The first catch statement will catch an Mpx.AssertException and log its associated text message to a file.

 

Try
mpx.Test.AssertTest()
Catch e As mpx.AssertException
LogToFile(ex.Message)
Catch e As Exception
' Handle exception appropriately
End Try

See Also

MPX Error Handling

MPX Debug Assertion Dialog Box

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering