User loginNavigation |
Why do we need finally in try?Why do we need the finally clause in exception handling pattern? I never understood why would one need it... or, rather, I was always able to code everything without using the finally block. function f (file_handle h) { try { // do something dangerous h.read; } catch (e) { //catch the exception and do something print_err ("Can't read file " + h.name); } h.close; } Why and in what situations does one need the finally clause? I hope that this question does not sound too stupid, as I believe that a lot of people are perfectly accomodated to using the By Tom Primožič at 2006-12-17 10:59 | LtU Forum | previous forum topic | next forum topic | other blogs | 17628 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago