diff options
author | Artur Signell <artur@vaadin.com> | 2015-08-04 12:33:30 +0300 |
---|---|---|
committer | Mika Murtojarvi <mika@vaadin.com> | 2015-08-18 15:04:45 +0300 |
commit | 989154c5fe9c7563d0782e0e29dd29edf4cf1ca0 (patch) | |
tree | 163ce13e91a521e804eb903b49ab0ca0e35ed641 /server/src/com/vaadin/data | |
parent | 322d777d2eaece892a16d4f486f5108740e9226a (diff) | |
download | vaadin-framework-989154c5fe9c7563d0782e0e29dd29edf4cf1ca0.tar.gz vaadin-framework-989154c5fe9c7563d0782e0e29dd29edf4cf1ca0.zip |
Handle renderer exceptions gracefully (#18554)
Change-Id: I46557f6c6f8543ab61b863145863824785d14784
Diffstat (limited to 'server/src/com/vaadin/data')
-rw-r--r-- | server/src/com/vaadin/data/RpcDataProviderExtension.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/src/com/vaadin/data/RpcDataProviderExtension.java b/server/src/com/vaadin/data/RpcDataProviderExtension.java index 6f8a7e8f7b..98394c45df 100644 --- a/server/src/com/vaadin/data/RpcDataProviderExtension.java +++ b/server/src/com/vaadin/data/RpcDataProviderExtension.java @@ -26,6 +26,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; +import java.util.logging.Level; import java.util.logging.Logger; import com.google.gwt.thirdparty.guava.common.collect.BiMap; @@ -1238,7 +1239,13 @@ public class RpcDataProviderExtension extends AbstractExtension { safeConverter.getPresentationType(), locale); } - JsonValue encodedValue = renderer.encode(presentationValue); + JsonValue encodedValue; + try { + encodedValue = renderer.encode(presentationValue); + } catch (Exception e) { + getLogger().log(Level.SEVERE, "Unable to encode data", e); + encodedValue = renderer.encode(null); + } return encodedValue; } |