rspec/rules/S2737/swift/rule.adoc

27 lines
312 B
Plaintext
Raw Normal View History

2020-06-30 12:48:07 +02:00
include::../description.adoc[]
== Noncompliant Code Example
----
do {
try loadImage(imagePath)
} catch { // Noncompliant
throw error
}
----
== Compliant Solution
----
do {
try loadImage(imagePath)
} catch {
handleImageError(error)
throw error
}
----
or
----
try loadImage(imagePath)
----