Where is the user message string displayed for Contract.Invariant call


my test exe throws "exe has encountered problem , needs close" box when hits class following code:

        [contractinvariantmethod]
        void objectinvariant()
        {
            contract.invariant(watcherlist.count > 0, "objectinvariant failed");
        }

but error box not contain info on invariant throws this. don'e see user message displayed anywhere (also checked app event log). where see invariant user message? there way associate invariant custom exception?

tia

if rewriter working properly, should see message put invariant, either in exception (if throwing exceptions) or else in assert dialog (if asserting on failure). if can create small repro , send me in zip file, can take @ it.


mike barnett


DevLabs  >  Code Contracts



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'