incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r490611 - in /incubator/xap/trunk/src/xap: taghandling/AbstractTagImpl.js xml/InvalidXmlException.js xml/InvalidXmlExceptionRes.js
Date Thu, 28 Dec 2006 00:24:51 GMT
Author: jmargaris
Date: Wed Dec 27 16:24:51 2006
New Revision: 490611

URL: http://svn.apache.org/viewvc?view=rev&rev=490611
Log:
InvalidXmlException was an old class that didn't work well, fixed up

Modified:
    incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
    incubator/xap/trunk/src/xap/xml/InvalidXmlException.js
    incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js

Modified: incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js?view=diff&rev=490611&r1=490610&r2=490611
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js (original)
+++ incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js Wed Dec 27 16:24:51 2006
@@ -761,18 +761,10 @@
  * AttributeConversionException.
  * @return InvalidXmlException object
  */
-xap.taghandling.AbstractTagImpl.prototype.constructInvalidXmlException = function( attributeName,attributeValue,
e, ex ) {
-	// Not all exceptions encountered here have getMessage()
-	// ---reference exceptions in particular												
-    var errStr = ""+ex ;
-    if(ex.getMessage){
-    	errStr = ex.getMessage() ;
-    }														
+xap.taghandling.AbstractTagImpl.prototype.constructInvalidXmlException = function( attributeName,attributeValue,
e, ex ) {									
     var exception = new xap.xml.InvalidXmlException(
             xap.xml.InvalidXmlException.BAD_ATTRIBUTE_WITH_ROOT_CAUSE,
-            new Array( attributeName, attributeValue, errStr,xap.xml.InvalidXmlException.toString(
e ),
-            xap.xml.InvalidXmlException.toString( e.getParent() )),
-            ex );
+            [attributeName, attributeValue ,e.toXml(), xap.util.XapException.exceptionToString(ex)
]);
     return exception;
 }
 

Modified: incubator/xap/trunk/src/xap/xml/InvalidXmlException.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/InvalidXmlException.js?view=diff&rev=490611&r1=490610&r2=490611
==============================================================================
--- incubator/xap/trunk/src/xap/xml/InvalidXmlException.js (original)
+++ incubator/xap/trunk/src/xap/xml/InvalidXmlException.js Wed Dec 27 16:24:51 2006
@@ -70,13 +70,11 @@
  */
 xap.xml.InvalidXmlException.PREFIX_CONFLICT_MSGID = "prefixConflict";
 
+xap.xml.InvalidXmlException.BAD_ATTRIBUTE_WITH_ROOT_CAUSE = "badAttributeCausedBy";
+
 //-----------------------------------------------------------------------
 // Public Class Methods.
 //-----------------------------------------------------------------------
-xap.xml.InvalidXmlException.elementToString = function( element ) {
-	return element.toXml( true );
-}
-
 
 xap.xml.InvalidXmlException.prototype.toString = function() {
 	var buf = "[InvalidXmlException:\t" + 

Modified: incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js?view=diff&rev=490611&r1=490610&r2=490611
==============================================================================
--- incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js (original)
+++ incubator/xap/trunk/src/xap/xml/InvalidXmlExceptionRes.js Wed Dec 27 16:24:51 2006
@@ -25,6 +25,8 @@
  */
 xap.xml.InvalidXmlExceptionRes = function() {
 	this.messages = new Object();
+	
+	this.messages[xap.xml.InvalidXmlException.BAD_ATTRIBUTE_WITH_ROOT_CAUSE] = 'Bad attribute
with name {0} and value {1} on element {2} because of {3}';
 	this.messages[xap.xml.InvalidXmlException.MISSING_ATTRIBUTE_MSGID] = "Missing required attribute
{0} on element: {1}";
 	this.messages[xap.xml.InvalidXmlException.NULL_LOCALNAME_MSGID] = "The localName supplied
to the method is null, cannot create an Element with a null localName.";
 	this.messages[xap.xml.InvalidXmlException.ID_CONFLICT_MSGID] = "An element with id ''{0}''
already exists in this document.";



Mime
View raw message