You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/10/27 21:05:16 UTC
svn commit: r1189939 - in
/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5:
tapestry-messages.js tapestry-messages_de.js tapestry.js
Author: hlship
Date: Thu Oct 27 19:05:15 2011
New Revision: 1189939
URL: http://svn.apache.org/viewvc?rev=1189939&view=rev
Log:
TAP5-1732: Tapestry should not swallow client-side initialization exceptions, as that makes it harder to debug
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages.js
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_de.js
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages.js?rev=1189939&r1=1189938&r2=1189939&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages.js Thu Oct 27 19:05:15 2011
@@ -1,4 +1,4 @@
-// Copyright 2009, 2010 The Apache Software Foundation
+// Copyright 2009, 2010, 2011 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -36,7 +36,5 @@ Tapestry.Messages = {
invalidCharacter : "Invalid character",
- communicationFailed : "Communication with the server failed: ",
-
- invocationException : "Exception invoking function #{fname} with parameters #{params}: #{exception}"
+ communicationFailed : "Communication with the server failed: "
};
\ No newline at end of file
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_de.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_de.js?rev=1189939&r1=1189938&r2=1189939&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_de.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry-messages_de.js Thu Oct 27 19:05:15 2011
@@ -37,6 +37,4 @@ Tapestry.Messages = {
invalidCharacter : "Ungültiges Zeichen",
communicationFailed : "Kommunikation mit dem Server ist fehlgeschlagen: ",
-
- invocationException : "Fehler beim Aufrufen der Funktion #{fname} mit den Parametern #{params}: #{exception}"
};
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js?rev=1189939&r1=1189938&r2=1189939&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/tapestry.js Thu Oct 27 19:05:15 2011
@@ -265,15 +265,7 @@ var Tapestry = {
parameterList = [ parameterList ];
}
- try {
- initf.apply(this, parameterList);
- } catch (e) {
- Tapestry.error(Tapestry.Messages.invocationException, {
- fname : "Tapestry.Initializer." + functionName,
- params : Object.toJSON(parameterList),
- exception : e
- });
- }
+ initf.apply(this, parameterList);
});
});
},
@@ -1148,16 +1140,9 @@ T5.extendInitializers({
$(field).getFieldEventManager();
$A(pair.value)
- .each(
- function(spec) {
+ .each(function(spec) {
/*
- * Each pair value is an
- * array of specs, each
- * spec is a 2 or 3
- * element array.
- * validator function
- * name, message,
- * optional constraint
+ * Each pair value is an array of specs, each spec is a 2 or 3 element array. validator function name, message, optional constraint
*/
var name = spec[0];
@@ -1168,47 +1153,17 @@ T5.extendInitializers({
if (vfunc == undefined) {
Tapestry
- .error(
- Tapestry.Messages.missingValidator,
- {
- name : name,
- fieldName : field.id
- });
+ .error(Tapestry.Messages.missingValidator, {
+ name : name,
+ fieldName : field.id
+ });
return;
}
/*
- * Pass the extended
- * field, the provided
- * message, and the
- * constraint object to
- * the
- * Tapestry.Validator
- * function, so that it
- * can, typically,
- * invoke
- * field.addValidator().
+ * Pass the extended field, the provided message, and the constraint object to the Tapestry.Validator function, so that it can, typically, invoke field.addValidator().
*/
- try {
- vfunc.call(this,
- field,
- message,
- constraint);
- } catch (e) {
- Tapestry
- .error(
- Tapestry.Messages.invocationException,
- {
- fname : "Tapestry.Validator."
- + functionName,
- params : Object
- .toJSON([
- field.id,
- message,
- constraint ]),
- exception : e
- });
- }
+ vfunc.call(this, field, message, constraint);
});
});
},