How much breakage are we talking about? If it is difficult to fix Scarab, then we should probably branch Torque. If it is easy, then lets just make the changes.
Another change we need to make to Torque is to have it return List instead of Vector. :-) That should break lots of code. :-) -jon on 2/22/02 9:15 AM, "Mathieu Frenette" <[EMAIL PROTECTED]> wrote: > Thanks Jon for the great idea. > > I rebuilt Scarab from scratch with the modified Torque and the problems > showed up. > > Here is why... > > We assumed that throwing TorqueException instead of Exception was fully > backward compatible with existing "client" code. However, we forgot to > consider "extending" code. Indeed, if anybody extended a base class and > overrode a method that was throwing Exception, this method is no longer > valid now that its base method throws TorqueException. > > So all extending classes would have to be patched to also throw > TorqueException. This is only required for overriding methods, not for new > methods. But even then, it might represent an important rework for big > projects such as Scarab, which have tens of extending classes with tons of > overrides. > > What's even worse is that, due to the lenient exception model used in > Torque, all extending methods are free to throw whatever exception they > want. But those exceptions cannot simply be wrapped into TorqueException, > because chances are that the client code using the extending classes might > be catching the specific exceptions. > > That means the client code is bound to the implementation details of the OM, > and especially to the extending classes' implementation. That is really > BAD. And that was my whole point when arguing that TorqueException was so > important. Now it seems to be too late. Unless we force people into the > change, which is not a good option either. > > I'm sad about that, not because of the time I put into it, but rather > because of my idealistic mind! ;-) Hehe... > > Any comments, opinions, suggestions would be appreciated... > > -- Mathieu. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
