mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-05 18:42:55 +00:00
bug5044: rather create an empty TimeRange instead of provoking exception;
furthermore, I've added logging for uncaught GWT RPC exceptions
This commit is contained in:
1 parent
9ec982c19f
commit
d1266b24ab
2 files changed
+7
-1
No files matched your search
+2
-1
@@ -49,7 +49,8 @@ public class RegattaLogDeviceMappingFinder<ItemT extends WithID>
|
||||
|
||||
protected DeviceMappingWithRegattaLogEvent<ItemT> createMapping(DeviceIdentifier device, ItemT item,
|
||||
TimePoint from, TimePoint toInclusive, Serializable originalEventId, RegattaLogDeviceMappingEvent<ItemT> event) {
|
||||
return new DeviceMappingWithRegattaLogEventImpl<ItemT>(item, device, new TimeRangeImpl(from, toInclusive, /* inclusive */ true),
|
||||
return new DeviceMappingWithRegattaLogEventImpl<ItemT>(item, device, new TimeRangeImpl(from,
|
||||
toInclusive.before(from) ? from : toInclusive, /* inclusive */ true),
|
||||
Collections.singletonList(originalEventId), event);
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -3,6 +3,8 @@ package com.sap.sse.gwt.server;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException;
|
||||
import com.google.gwt.user.client.rpc.RpcTokenException;
|
||||
@@ -14,6 +16,8 @@ import com.google.gwt.user.server.rpc.SerializationPolicy;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
|
||||
public abstract class DelegatingProxiedRemoteServiceServlet extends ProxiedRemoteServiceServlet {
|
||||
private static final Logger logger = Logger.getLogger(DelegatingProxiedRemoteServiceServlet.class.getName())
|
||||
;
|
||||
private static final long serialVersionUID = -5543378343472849437L;
|
||||
|
||||
/**
|
||||
@@ -73,6 +77,7 @@ public abstract class DelegatingProxiedRemoteServiceServlet extends ProxiedRemot
|
||||
} catch (InvocationTargetException e) {
|
||||
// Try to encode the caught exception
|
||||
Throwable cause = e.getCause();
|
||||
logger.log(Level.SEVERE, "Uncaught exception, forwarded to client", cause);
|
||||
responsePayload = RPC.encodeResponseForFailure(serviceMethod, cause, serializationPolicy, flags);
|
||||
}
|
||||
return responsePayload;
|
||||
|
||||
Reference in new issue
Block a user