forked from dorkbox/SystemTray
Added extra error info when the dispatch queue is buggered up
This commit is contained in:
parent
a23cb3bf22
commit
d104c7e510
@ -248,7 +248,12 @@ class Gtk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
blockUntilStarted.await(10, TimeUnit.SECONDS);
|
if (!blockUntilStarted.await(10, TimeUnit.SECONDS)) {
|
||||||
|
if (SystemTray.DEBUG) {
|
||||||
|
SystemTray.logger.error("Something is very wrong. The waitForStartup took longer than expected.",
|
||||||
|
new RuntimeException());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -267,7 +272,12 @@ class Gtk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
blockUntilStarted.await(10, TimeUnit.SECONDS);
|
if (!blockUntilStarted.await(10, TimeUnit.SECONDS)) {
|
||||||
|
if (SystemTray.DEBUG) {
|
||||||
|
SystemTray.logger.error("Something is very wrong. The waitForStartup took longer than expected.",
|
||||||
|
new RuntimeException());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -285,7 +295,12 @@ class Gtk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
blockUntilStarted.await(10, TimeUnit.SECONDS);
|
if (!blockUntilStarted.await(10, TimeUnit.SECONDS)) {
|
||||||
|
if (SystemTray.DEBUG) {
|
||||||
|
SystemTray.logger.error("Something is very wrong. The waitForStartup took longer than expected.",
|
||||||
|
new RuntimeException());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -377,11 +392,12 @@ class Gtk {
|
|||||||
try {
|
try {
|
||||||
if (!countDownLatch.await(TIMEOUT, TimeUnit.SECONDS)) {
|
if (!countDownLatch.await(TIMEOUT, TimeUnit.SECONDS)) {
|
||||||
if (SystemTray.DEBUG) {
|
if (SystemTray.DEBUG) {
|
||||||
SystemTray.logger.error("Event dispatch queue took longer than " + TIMEOUT + " seconds to complete. Please adjust " +
|
SystemTray.logger.error("Something is very wrong. The Event Dispatch Queue took longer than " + TIMEOUT + " seconds " +
|
||||||
"`SystemTray.TIMEOUT` to a value which better suites your environment.");
|
"to complete. Please adjust `SystemTray.TIMEOUT` to a value which better suites your environment.",
|
||||||
|
new RuntimeException());
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("Event dispatch queue took longer than " + TIMEOUT + " seconds to complete. Please adjust " +
|
throw new RuntimeException("Something is very wrong. The Event Dispatch Queue took longer than " + TIMEOUT + " seconds " +
|
||||||
"`SystemTray.TIMEOUT` to a value which better suites your environment.");
|
"to complete. Please adjust `SystemTray.TIMEOUT` to a value which better suites your environment.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user