in reply to Re: if else and not reachable coding style
in thread if else and not reachable coding style
if ( CASE1) { return 1; } elsif ( CASE2 ) { return 2; } else { die("Must be one of CASE1 or CASE2"); }
That is, a case where formal logic without knowledge of the inputs can't tell you what the results will be, but the business rules demand that the result be one of two choices.
It's always good to have an exception handler for when things that other people swear will never, ever happen suddenly do happen anyway. ;-)
--
Ytrew
|
|---|