rspec/rules/S1163/vbnet/rule.adoc
2023-06-12 09:22:59 +02:00

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[]