Skip to content

Commit 8022b56

Browse files
committed
gpclient: improving error message
1 parent 1c7e075 commit 8022b56

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

gpclient/gpclient-core/src/main/java/org/epics/gpclient/PVDirector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class PVDirector<R, W> {
6060
/** Function to write values */
6161
final Consumer<W> writeFunction;
6262
/** Creation for stack trace */
63-
private final Exception creationStackTrace = new Exception("PV was never closed (stack trace for creation)");
63+
private final Exception creationStackTrace = new Exception("Open PV was garbage collected: see stack trace for where it was created");
6464
/** Used to ignore duplicated errors */
6565
private final AtomicReference<Notification> lastNotification = new AtomicReference<>();
6666
/** Maximum rate for notification */
@@ -268,7 +268,7 @@ private boolean isActive() {
268268
if (pv != null && !pv.isClosed()) {
269269
return true;
270270
} else if (pv == null && closed != true) {
271-
log.log(Level.WARNING, "PVReader wasn't properly closed and it was garbage collected. Closing the associated connections...", creationStackTrace);
271+
log.log(Level.WARNING, "Open PVReader/Writer was garbage collected: always keep a handle and close it. Disconnecting and cleaning up.", creationStackTrace);
272272
return false;
273273
} else {
274274
return false;

0 commit comments

Comments
 (0)