summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2015-06-14 15:46:14 +0300
committerHenri Sara <hesara@vaadin.com>2015-07-04 10:49:36 +0300
commit5186717b7d89cfc40bcf476cd909ac03f8630c5c (patch)
treec6a19df74c07d9835f57dcf99de12340afd61015 /server
parentaa104e4c06c726d2c26e00d7955d2e9bc7c0fdd7 (diff)
downloadvaadin-framework-5186717b7d89cfc40bcf476cd909ac03f8630c5c.tar.gz
vaadin-framework-5186717b7d89cfc40bcf476cd909ac03f8630c5c.zip
Send beforeClientResponse exceptions to an error handler (#14214)
Change-Id: I5dcfbc45424c2b85ff159b02a8a75c24140630cc
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/LegacyCommunicationManager.java10
-rw-r--r--server/src/com/vaadin/server/communication/UidlWriter.java6
2 files changed, 9 insertions, 7 deletions
diff --git a/server/src/com/vaadin/server/LegacyCommunicationManager.java b/server/src/com/vaadin/server/LegacyCommunicationManager.java
index fda5ad444f..e982cdf10a 100644
--- a/server/src/com/vaadin/server/LegacyCommunicationManager.java
+++ b/server/src/com/vaadin/server/LegacyCommunicationManager.java
@@ -388,17 +388,15 @@ public class LegacyCommunicationManager implements Serializable {
}
/**
- * Handles an exception that occurred when processing RPC calls or a file
- * upload.
+ * Handles an exception related to a connector by invoking the appropriate
+ * error handler.
*
* @deprecated As of 7.1. See #11411.
*
- * @param ui
- * The UI where the exception occured
* @param throwable
- * The exception
+ * the exception to handle
* @param connector
- * The Rpc target
+ * the connector that the exception is related to
*/
@Deprecated
public void handleConnectorRelatedException(ClientConnector connector,
diff --git a/server/src/com/vaadin/server/communication/UidlWriter.java b/server/src/com/vaadin/server/communication/UidlWriter.java
index 00a65d3877..a4797e49aa 100644
--- a/server/src/com/vaadin/server/communication/UidlWriter.java
+++ b/server/src/com/vaadin/server/communication/UidlWriter.java
@@ -109,7 +109,11 @@ public class UidlWriter implements Serializable {
.isClientSideInitialized(connector);
processedConnectors.add(connector);
- connector.beforeClientResponse(!initialized);
+ try {
+ connector.beforeClientResponse(!initialized);
+ } catch (RuntimeException e) {
+ manager.handleConnectorRelatedException(connector, e);
+ }
}
}