Better exception handling.
[TD_SR.git] / TD1 / exo3 / BufferCirc.java
index e03e8ea950e2cdd3ab244bde76454722f2abbd90..486951502caffd1d4925291dfa37eb1d74372f74 100644 (file)
@@ -36,7 +36,9 @@ public class BufferCirc {
                                                                   + " is waiting, size: " + nbObj);
                                wait();
                        }
-                       catch (InterruptedException e) {}
+                       catch (InterruptedException e) {
+                               System.out.println("InterruptedException: " + e);
+                       }
                }
                nbObj++;
                tampon[prem] = obj;
@@ -53,7 +55,9 @@ public class BufferCirc {
                                                                   + " is waiting, size: " + nbObj);
                                wait();
                        }
-                       catch (InterruptedException e) {}
+                       catch (InterruptedException e) {
+                               System.out.println("InterruptedException: " + e);
+                       }
                }
                Object outObj = null;
                nbObj--;