C
cody
is there any difference between
try{}catch(Exception){}
and
try{}catch{} ?
if not, why this short syntax? i think it encourages programmers especially
beginners to catch all exceptions instead of catching a specific exception
which is a better style of programming. one could only under rare
circumstances catch all exceptions.
and i have another question. is there a difference between:
catch(Exception e){throw e;}
and
catch(Exception e){throw new Exception(e);}
which one is better for rethrowing an exception?
thx for answering me in advance!
--
cody
Freeware Tools, Games and Humour
http://www.deutronium.de.vu
[noncommercial and no ****ing ads]
try{}catch(Exception){}
and
try{}catch{} ?
if not, why this short syntax? i think it encourages programmers especially
beginners to catch all exceptions instead of catching a specific exception
which is a better style of programming. one could only under rare
circumstances catch all exceptions.
and i have another question. is there a difference between:
catch(Exception e){throw e;}
and
catch(Exception e){throw new Exception(e);}
which one is better for rethrowing an exception?
thx for answering me in advance!
--
cody
Freeware Tools, Games and Humour
http://www.deutronium.de.vu
[noncommercial and no ****ing ads]