include::../description.adoc[]

== Noncompliant Code Example

----
void openResource() {
  @throw [NSException exceptionWithName:@"FileNotFoundException" reason:@"File Not Found on System" userInfo:nil];
}

void fun() {
  @try {
    openResource();
  }
  @finally {
    closeResource();
    @throw ... ; // Noncompliant - will mask previous exception
  }
}
----

== Compliant Solution

----
void openResource() {
  @throw [NSException exceptionWithName:@"FileNotFoundException" reason:@"File Not Found on System" userInfo:nil];
}

void fun() {
  @try {
    openResource();
  }
  @finally {
    closeResource();
  }
}
----

include::../see.adoc[]

ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]
