You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2009/04/22 13:13:02 UTC
svn commit: r767468 -
/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js
Author: bommel
Date: Wed Apr 22 11:13:02 2009
New Revision: 767468
URL: http://svn.apache.org/viewvc?rev=767468&view=rev
Log:
(TOMAHAWK-1414) Better error handling for PPRPanelGroup
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js?rev=767468&r1=767467&r2=767468&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js Wed Apr 22 11:13:02 2009
@@ -337,7 +337,21 @@
// strip html comment start to make ppr work with ie 5.5
script = script.substring(4);
}
- eval(script);
+ try
+ {
+ eval(script);
+ }
+ catch (e)
+ {
+ if (this.showDebugMessages)
+ {
+ alert('Error in eval script: ' + script + ' ' + e.message );
+ }
+ else
+ {
+ throw e;
+ }
+ }
s = s.substr(0, match.index) + s.substr(match.index + match[0].length);
}
}
@@ -423,6 +437,11 @@
}
else if (!this.formNode.myFacesPPRCtrl.blockPeriodicalUpdateDuringPost)
{
+ if (type == "error" && this.showDebugMessages)
+ {
+ alert("An unexpected error occured during an ajax-request." + data.message);
+ }
+
// In case of an error during the AJAX Request do a normal form submit
// to enable showing a proper error page
this.formNode.myFacesPPRCtrl.callbackErrorHandler();
@@ -519,6 +538,10 @@
{
oamSetHiddenInput(formName, formName + ':' + '_idcl', triggerElement.id);
}
+ if (this.showDebugMessages)
+ {
+ alert("An unexpected error occured during an ajax-request!");
+ }
this.form.submit();
}