Make shutdown InterruptedExceptions not noisy

This commit is contained in:
Mike Primm 2022-02-16 00:50:53 -06:00
parent 04147aadb1
commit 15b1328c0e

View File

@ -228,10 +228,12 @@ public class MapManager {
try { try {
r.run(); r.run();
} catch (Exception x) { } catch (Exception x) {
if (!(x instanceof InterruptedException)) { // Avoid shutdown noise
Log.severe("Exception during render job: " + r); Log.severe("Exception during render job: " + r);
x.printStackTrace(); x.printStackTrace();
} }
} }
}
}); });
} catch (RejectedExecutionException rxe) { /* Pool shutdown - nominal for reload or unload */ } catch (RejectedExecutionException rxe) { /* Pool shutdown - nominal for reload or unload */
} }
@ -244,10 +246,12 @@ public class MapManager {
try { try {
command.run(); command.run();
} catch (Exception x) { } catch (Exception x) {
if (!(x instanceof InterruptedException)) { // Avoid shutdown noise
Log.severe("Exception during render job: " + command); Log.severe("Exception during render job: " + command);
x.printStackTrace(); x.printStackTrace();
} }
} }
}
}, delay, unit); }, delay, unit);
} catch (RejectedExecutionException rxe) { } catch (RejectedExecutionException rxe) {
return null; /* Pool shut down when we reload or unload */ return null; /* Pool shut down when we reload or unload */