diff options
author | Leif Åstrand <leif@vaadin.com> | 2015-06-14 15:46:14 +0300 |
---|---|---|
committer | Teppo Kurki <teppo.kurki@vaadin.com> | 2015-06-17 12:33:23 +0000 |
commit | 024a2ab52e1ab5ac039c78f86c9c6fbf3a70f131 (patch) | |
tree | 1a84a06735896a4061e5f7e4cf9d5cae9773997b /server/src | |
parent | f8aacf7c53d2e758e431588f44185b583fad8cb6 (diff) | |
download | vaadin-framework-024a2ab52e1ab5ac039c78f86c9c6fbf3a70f131.tar.gz vaadin-framework-024a2ab52e1ab5ac039c78f86c9c6fbf3a70f131.zip |
Send beforeClientResponse exceptions to an error handler (#14214)
Change-Id: Ib0cd9a402bbef0c7adb65bd8298a71b5521edd7c
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/server/LegacyCommunicationManager.java | 10 | ||||
-rw-r--r-- | server/src/com/vaadin/server/communication/UidlWriter.java | 6 |
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); + } } } |