X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FThrow1.scl;fp=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FThrow1.scl;h=bc758897b6b8b67663ebf7b50387930f2fecaf78;hp=0000000000000000000000000000000000000000;hb=fc2cb126576a7d0f3e6e1d4812992e4e69e481cd;hpb=593a73243a96baa551bb42f15fb6911aaa8f1e60 diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Throw1.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Throw1.scl new file mode 100644 index 000000000..bc758897b --- /dev/null +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Throw1.scl @@ -0,0 +1,10 @@ +import "Prelude" + +importJava "java.lang.Exception" where + @JavaName "" + createException :: String -> Exception + +main = throw (createException "Foo") `catch` \(e :: Exception) -> print e +-- +java.lang.Exception: Foo +() \ No newline at end of file