Mercurial > hg > testrepo
changeset 76:80cb82d2b761
Hello.java (hello): Catch any sleep exception.
author | Mark Wielaard <mark@klomp.org> |
---|---|
date | Sun, 22 Apr 2012 14:54:37 +0200 |
parents | ec7e39a1bd54 |
children | ed84a53d9e75 |
files | ChangeLog Hello.java |
diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Apr 22 14:48:59 2012 +0200 +++ b/ChangeLog Sun Apr 22 14:54:37 2012 +0200 @@ -1,3 +1,7 @@ +2012-04-22 Mark Wielaard <mark@klomp.org> + + * Hello.java (hello): Catch any sleep exception. + 2012-04-22 Mark Wielaard <mark@klomp.org> * Hello.java (hello): Thread.sleep() a bit.
--- a/Hello.java Sun Apr 22 14:48:59 2012 +0200 +++ b/Hello.java Sun Apr 22 14:54:37 2012 +0200 @@ -49,7 +49,14 @@ System.out.println ("yarly?"); System.out.println ("Slow and fuzzy"); System.out.println ("I'll repeat the original question"); - Thread.sleep(1); + try + { + Thread.sleep(1); + } + catch (InterruptedException ie) + { + /* Ignore short sleep. */ + } System.out.println ("Are you now or have you ever been"); System.out.println ("a member of the common ass party"); System.out.println ("or any other common ass organization?");