I want to throw an exception and the following is:
") Although it is being ignored.
("Some text" for throwing) is required to be wrapped or
( Some exceptions (exception "some text")) You can also set an attempt / hold / ultimately block:
(mydivision defn [xi ] (Try (/ xi) (aggregate (E. println "Done."))) RPL session:
& gt; User = & gt; (MyDivision 4 2) done 2 users => (MyVivision 4.0) Exception Message: Divide by Zero
Comments
Post a Comment