You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2014/07/09 13:57:55 UTC
svn commit: r1609119 -
/myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
Author: werpu
Date: Wed Jul 9 11:57:55 2014
New Revision: 1609119
URL: http://svn.apache.org/r1609119
Log:
https://issues.apache.org/jira/browse/MYFACES-3902
Modified:
myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
Modified: myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js?rev=1609119&r1=1609118&r2=1609119&view=diff
==============================================================================
--- myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js (original)
+++ myfaces/core/branches/2.1.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/_util/_Dom.js Wed Jul 9 11:57:55 2014
@@ -184,18 +184,14 @@ _MF_SINGLTN(_PFX_UTIL + "_Dom", Object,
_RT.globalEval(finalScripts.join("\n"));
}
} catch (e) {
- if(window.console && window.console.error) {
- //not sure if we
- //should use our standard
- //error mechanisms here
- //because in the head appendix
- //method only a console
- //error would be raised as well
- console.error(e.message || e.description || e);
- } else {
- if(jsf.getProjectStage() === "Development") {
- alert("Error in evaluated javascript:"+ (e.message || e.description || e));
- }
+ //we are now in accordance with the rest of the system of showing errors only in development mode
+ //the default error output is alert we always can override it with
+ //window.myfaces = window.myfaces ||Â {};
+ //myfaces.config = myfaces.config ||Â {};
+ //myfaces.config.defaultErrorOutput = console.error;
+ if(jsf.getProjectStage() === "Development") {
+ var defaultErrorOutput = myfaces._impl.core._Runtime.getGlobalConfig("defaultErrorOutput", alert);
+ defaultErrorOutput("Error in evaluated javascript:"+ (e.message || e.description || e));
}
} finally {
//the usual ie6 fix code