Mercurial > hg > Members > nobuyasu > konoha
changeset 6:ed611531a49b
add KonohaException.java and throwTest.k
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 27 May 2012 21:02:17 +0900 |
parents | 108812b08e75 |
children | 04447797b5df |
files | test/KonohaException.java test/throwTest.k |
diffstat | 2 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/KonohaException.java Sun May 27 21:02:17 2012 +0900 @@ -0,0 +1,7 @@ +import java.io.*; + +class KonohaException extends Exception { + public KonohaException(String str) { + super(str); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/throwTest.k Sun May 27 21:02:17 2012 +0900 @@ -0,0 +1,21 @@ +void main(String[] args) +{ + try { + // throw new Script!!("throw Script!!"); + // throw new IO!!("throw IO!!"); + throw new MyError!!("throw MyError!!"); + } catch (Script!! e) { + print "catch Script!!"; + print e; + } catch (IO!! e) { + print "catch IO!!"; + print e; + } catch (MyError!! e) { + print "catch MyError!!"; + print e; + } finally { + + } + + +} \ No newline at end of file