From: <ju...@us...> - 2007-02-07 18:36:02
|
Revision: 3872 http://svn.sourceforge.net/smartfrog/?rev=3872&view=rev Author: julgui Date: 2007-02-07 10:35:59 -0800 (Wed, 07 Feb 2007) Log Message: ----------- Improved: handling component description. Modified Paths: -------------- trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/sfcomponentdescription/SFComponentDescriptionImpl.java Modified: trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/sfcomponentdescription/SFComponentDescriptionImpl.java =================================================================== --- trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/sfcomponentdescription/SFComponentDescriptionImpl.java 2007-02-07 16:43:55 UTC (rev 3871) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/sfcomponentdescription/SFComponentDescriptionImpl.java 2007-02-07 18:35:59 UTC (rev 3872) @@ -670,14 +670,17 @@ } else newContext.put(key, copyValue(value)); } catch (SmartFrogException e1) { - //shouldn't happen - its for the checking of the tag! + throw ((SmartFrogCompilationException)SmartFrogCompilationException.forward(e1)); } try { - tags = sfContext.sfGetTags(key); - newContext.sfAddTags(key, tags); + if (newContext.sfContainsAttribute(key)){ + tags = sfContext.sfGetTags(key); + newContext.sfAddTags(key, tags); + } } catch (SmartFrogException e1) { - //shouldn't happen + e1.printStackTrace(); + //It shouldn't happen } } @@ -696,8 +699,12 @@ if (v instanceof Vector) { return copyVector((Vector)v); } - throw new SmartFrogCompilationException("illegal value in context during conversion to ComponentDesscription " + - v.toString() + " in component " + sfCompleteName()); + if (v instanceof ComponentDescription) { + throw new SmartFrogCompilationException("illegal value in context during conversion to ComponentDescription. ComponentDescription cannot be used; use SFComponentDescription. Context: " + + v.toString() + " (Class: "+v.getClass().getCanonicalName()+") in component " + sfCompleteName()); + } + throw new SmartFrogCompilationException("illegal value in context during conversion to ComponentDescription " + + v.toString() + " (Class: "+v.getClass().getCanonicalName()+") in component " + sfCompleteName()); } protected Object copyVector(Vector v) throws SmartFrogCompilationException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |