You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/06/29 17:53:58 UTC

svn commit: r418099 - /incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js

Author: mturyn
Date: Thu Jun 29 10:53:58 2006
New Revision: 418099

URL: http://svn.apache.org/viewvc?rev=418099&view=rev
Log:
Tweaked exception handling to cover exceptions we didn't create that don't have the getMessage() method.

Modified:
    incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js

Modified: incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js?rev=418099&r1=418098&r2=418099&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js (original)
+++ incubator/xap/trunk/src/xap/taghandling/AbstractTagImpl.js Thu Jun 29 10:53:58 2006
@@ -725,11 +725,15 @@
  * @return InvalidXmlException object
  */
 AbstractTagImpl.prototype.constructInvalidXmlException = function( attributeName,
-														attributeValue, e, ex ) {
+	// Not all exceptions encountered here have getMessage()
+	// ---reference exceptions in particular												attributeValue, e, ex ) {
+    var errStr = ""+ex ;
+    if(ex.getMessage){
+    	errStr = ex.getMessage() ;
+    }														
     var exception = new InvalidXmlException(
             InvalidXmlException.BAD_ATTRIBUTE_WITH_ROOT_CAUSE,
-            new Array( attributeName, attributeValue, ex.getMessage(),
-            InvalidXmlException.toString( e ),
+            new Array( attributeName, attributeValue, errStr,InvalidXmlException.toString( e ),
             InvalidXmlException.toString( e.getParent() )),
             ex );
     return exception;