mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-11 06:40:53 +00:00
Logging exceptions the right way
This commit is contained in:
1 parent
393c65d2d9
commit
1cf09573e0
1 file changed
+3
-2
+3
-2
@@ -11,6 +11,7 @@ import java.net.URLConnection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.osgi.util.tracker.ServiceTracker;
|
||||
@@ -200,7 +201,7 @@ public class ReplicationServiceImpl implements ReplicationService, OperationExec
|
||||
try {
|
||||
registerReplicaWithMaster(master);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
logger.log(Level.SEVERE, "ERROR", ex);
|
||||
throw ex;
|
||||
}
|
||||
replicatingFromMaster = master;
|
||||
@@ -211,7 +212,7 @@ public class ReplicationServiceImpl implements ReplicationService, OperationExec
|
||||
try {
|
||||
consumer = master.getConsumer();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
logger.log(Level.SEVERE, "ERROR", ex);
|
||||
replicatingFromMaster = null;
|
||||
throw ex;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user