X-Git-Url: https://git.piment-noir.org/?p=TD_SR.git;a=blobdiff_plain;f=TD1%2Fexo2%2FThreadJob.java;h=9b0f99eeba67d1954373e44eec5297c1525d8c0d;hp=32a7365f2a66de51747fba74a6eb18f282641a65;hb=7293fe6dc670d5164859159aab339fa3a4750773;hpb=4ab67210b63fb7157f789bb73a3fa496ca8f8aab diff --git a/TD1/exo2/ThreadJob.java b/TD1/exo2/ThreadJob.java index 32a7365..9b0f99e 100644 --- a/TD1/exo2/ThreadJob.java +++ b/TD1/exo2/ThreadJob.java @@ -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.out.println("InterruptedException: " + e); } String threadName = Thread.currentThread().getName(); System.out.println(threadName + " has slept for " + sleep_time + " ms for the " + (j + 1) + " times");