Use stderr where appropriate.
[TD_SR.git] / TD1 / exo2 / ThreadJob.java
index 32a7365f2a66de51747fba74a6eb18f282641a65..754f54ebdc4a1e704b94d8cde2a7d4bca715a97e 100644 (file)
@@ -18,6 +18,7 @@ public class ThreadJob implements Runnable {
             }
             catch(InterruptedException e) {
                 // this part is executed when an exception (in this example InterruptedException) occurs
+                System.err.println("InterruptedException: " + e);
             }
             String threadName = Thread.currentThread().getName();
             System.out.println(threadName + " has slept for " + sleep_time + " ms for the " + (j + 1) + " times");