RosettaCodeData/Task/Flow-control-structures/C-sharp/flow-control-structures-2.cs

11 lines
155 B
C#

try {
if (someCondition) {
throw new Exception();
}
} catch (Exception ex) {
LogException(ex);
throw;
} finally {
cleanUp();
}