From: Matt S. <Mat...@wh...> - 2007-01-23 15:45:15
|
I've been thinking, and the original intent of the code in BaseTransformer that wraps exceptions as TransformationExceptions was put in place for 2 reasons: 1) to ensure simple transformers bundled with Morph threw TransformationExceptions rather than the various exceptions thrown by Java, and 2) so that subclasses could throw checked exceptions if needed and have those changed to runtime exceptions Wrapping all exceptions for all subclasses of BaseTransformer was kind of a side effect I hadn't thought through. So this is a very long-winded way of saying that yes, I think we should make the change that runtime exceptions are not wrapped in TransformationExceptions. In terms of implementation, I think the easiest way to do this would be to introduce a new boolean flag that indicates whether or not the BaseTransformer should wrap TransformationExceptions as RuntimeExceptions. The default value would be false, meaning do not wrap RuntimeExceptions as TransformationExceptions. I think this issue impacts more than just Transformers. For the sake of consistency, we would want to change this behavior in Reflectors (I think your patch may have covered these), Languages, Contexts and perhaps Wrappers as well (I'm a little rusty myself on what the current behavior of Wrappers is). I'm very busy at work for the beginning of this week, but hopefully will have some time to look into this toward the end of this week. Matt Ben Alex wrote: > Hi Matt > > Has there been any progress/decision on this issue? > > Cheers > Ben > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > morph-developer mailing list > mor...@li... > https://lists.sourceforge.net/lists/listinfo/morph-developer > > |