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 | 17091 reads
|
Browse archives
Active forum topics
|
Recent comments
2 weeks 2 days ago
3 weeks 6 hours ago
3 weeks 1 day ago
3 weeks 1 day ago
3 weeks 6 days ago
4 weeks 2 days ago
4 weeks 2 days ago
4 weeks 2 days ago
5 weeks 4 days ago
5 weeks 6 days ago