From: <sf...@us...> - 2007-05-04 10:23:39
|
Revision: 4123 http://svn.sourceforge.net/smartfrog/?rev=4123&view=rev Author: sfpcg Date: 2007-05-04 03:23:37 -0700 (Fri, 04 May 2007) Log Message: ----------- Improved error messages 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-05-03 16:16:26 UTC (rev 4122) +++ trunk/core/smartfrog/src/org/smartfrog/sfcore/languages/sf/sfcomponentdescription/SFComponentDescriptionImpl.java 2007-05-04 10:23:37 UTC (rev 4123) @@ -790,18 +790,25 @@ if (v instanceof Vector) { return copyVector((Vector)v); } + /* 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().getName()+") in component " + sfCompleteName()); } - throw new SmartFrogCompilationException("illegal value in context during conversion to ComponentDescription " + + */ + throw new SmartFrogCompilationException("Non-primitive value found during conversion to ComponentDescription " + v.toString() + " (Class: "+v.getClass().getName()+") in component " + sfCompleteName()); } protected Object copyVector(Vector v) throws SmartFrogCompilationException { Vector res = new Vector(); for (int i = 0; i < v.size(); i++) { - res.add(copyValue(v.elementAt(i))); + try { + res.add(copyValue(v.elementAt(i))); + } catch (Exception e) { + throw new SmartFrogCompilationException("Error in vector during conversion to ComponentDescription. Vector: " + + v.toString() + " in component " + sfCompleteName(), e); + } } return res; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |