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 | 17658 reads
|
Browse archives
Active forum topics |
Recent comments
25 weeks 6 days ago
26 weeks 1 hour ago
26 weeks 1 hour ago
48 weeks 1 day ago
1 year 2 days ago
1 year 1 week ago
1 year 1 week ago
1 year 4 weeks ago
1 year 9 weeks ago
1 year 9 weeks ago