include::../why-dotnet.adoc[]

[source,vbnet,diff-id=1,diff-type=noncompliant]
----
Try
    Dim message = RetrieveMessage()
    Trace.Write($"Message received: {message}") ' Noncompliant
Catch ex As Exception
    Trace.WriteLine(ex) ' Noncompliant
End Try
----

[source,vbnet,diff-id=1,diff-type=compliant]
----
Try
    Dim message = RetrieveMessage()
    Trace.TraceInformation($"Message received: {message}")
Catch ex As Exception
    Trace.TraceError(ex)
End Try
----

include::../resources.adoc[]

include::../rspecator.adoc[]