timer_fired_event method { try { open_log_file call_method_with_other_logic() } catch // these should be fatal exceptions throw either by the file open, //or in the called method { } finally { close_log_file } private void call_method_with_other_logic() { // this may or may not write to open log file // this may or may not throw an exception // you may want to catch some exceptions here and handle them if appropriate or // let them bubble up the call stack }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)