Chaim Frenkel <[EMAIL PROTECTED]> writes: > >>>>> "PC" == Piers Cawley <[EMAIL PROTECTED]> writes: > > PC> The (continue|always|finally|whatever) clause will *always* be > PC> executed, even if one of the catch clauses does a die, so you can use > PC> this to roll back the database transaction or whatever else was going > PC> on and restore any invariants. > > Err, how does one differentiate between a 'good' entry and a 'bad' > entry. Um, if the try block completed without tripping a catch clause then it worked. If it didn't, then it didn't. If you want to be able to have the continue block not unwind on some occasions then have it check the value of $@. > PC> Note too that we don't need to do any case based magic, we can and > PC> should use polymorphism for that. > > Why? Just because? Good OO programming practice. Use polymorphism to replace switches. Then when you subclass one of your classes you don't have to go 'round rejigging the switch statements. -- Piers
- Re: RFC 80 (v1): Exception objects and classes for builtins Graham Barr
- Re: RFC 80 (v1): Exception objects and classes for buil... Peter Scott
- Re: RFC 80 (v1): Exception objects and classes for ... Graham Barr
- Re: RFC 80 (v1): Exception objects and classes ... John Porter
- Re: RFC 80 (v1): Exception objects and classes ... Peter Scott
- Re: RFC 80 (v1): Exception objects and clas... Chaim Frenkel
- Re: RFC 80 (v1): Exception objects and... Piers Cawley
- Re: RFC 80 (v1): Exception objects... John Porter
- Re: RFC 80 (v1): Exception objects... Piers Cawley
- Re: RFC 80 (v1): Exception objects... Chaim Frenkel
- Re: RFC 80 (v1): Exception objects... Piers Cawley
- Re: RFC 80 (v1): Exception objects... Chaim Frenkel
- Re: RFC 80 (v1): Exception objects... John Porter
- Re: RFC 80 (v1): Exception objects... Tony Olekshy
- Re: RFC 80 (v1): Exception objects and classes ... Peter Scott
- Re: RFC 80 (v1): Exception objects and classes for ... Bart Lateur
- Re: RFC 80 (v1): Exception objects and classes for buil... Chaim Frenkel
- Re: RFC 80 (v1): Exception objects and classes for ... Graham Barr
- Re: RFC 80 (v1): Exception objects and classes ... Chaim Frenkel
- Re: RFC 80 (v1): Exception objects and clas... Graham Barr