lundi 26 janvier 2015

Is the 'finally' portion of a 'try ... catch ... finally' construct even necessary?


Some languages (such as C++ and early versions of PHP) don't support the 'finally' part of a try ... catch ... finally construct. Is 'finally ever necessary? Because the code in it always runs, why wouldn't/shouldn't I just place that code after a 'try ... catch' block without a 'finally' clause?





Aucun commentaire:

Enregistrer un commentaire