26 lines
549 B
Plaintext
26 lines
549 B
Plaintext
include::../why.adoc[]
|
|
|
|
[source,vbnet,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
Try
|
|
' Some work which end up throwing an exception
|
|
Throw New ArgumentException()
|
|
Finally
|
|
' Cleanup
|
|
Throw New InvalidOperationException() ' Noncompliant: will mask the ArgumentException
|
|
End Try
|
|
----
|
|
|
|
[source,vbnet,diff-id=1,diff-type=compliant]
|
|
----
|
|
Try
|
|
' Some work which end up throwing an exception
|
|
Throw New ArgumentException()
|
|
Finally
|
|
' Cleanup without throwing
|
|
End Try
|
|
----
|
|
|
|
include::../resources-dotnet.adoc[]
|
|
|
|
include::../rspecator.adoc[] |