Is there any way to disable the backtrace? If it's an expected error,
there should be no need for a backtrace. One of the nice things about
raising an error is that it also rolls back transactions. It really is
too bad that it's such a performance hit as rescuing errors makes the
code so much nicer and readable, IMO. Throw/catch is not a
replacement for this way of doing things as it does not roll back
transactions (you'd have to checks after the block). This might
actually be desirable in the eyes of the DM team, though - as perhaps
some people don't _want_ a transaction rolled back if there's a
validation error. Plus it seems like you are still doing if/then/else
checks if you want to do something differently depending on if there's
a validation error or not. I'm kinda in the middle on this one. It
seems to me that GOTO-like statements in this case are not evil
because they are not global GOTO's - making them much more
maintainable than the nasty statements of yester-years. Bah, I hate
it when I have to choose between writing pretty code and writing for
performance (which seems to be all the time....)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---