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 | 17680 reads
|
Browse archives
Active forum topics |
Recent comments
32 weeks 6 days ago
32 weeks 6 days ago
32 weeks 6 days ago
1 year 3 weeks ago
1 year 7 weeks ago
1 year 8 weeks ago
1 year 8 weeks ago
1 year 11 weeks ago
1 year 16 weeks ago
1 year 16 weeks ago