Re: clojure.main always exits with code 0
On Apr 11, 6:13 pm, John D. Hume duelin.mark...@gmail.com wrote: Rich, Can I submit an issue and patch for this? I have a CA on file. Sure, thanks. Rich On Sun, Apr 5, 2009 at 8:15 PM, John D. Hume duelin.mark...@gmail.com wrote: Currently it does this: (try the good stuff ... (catch Exception e (.printStackTrace e *err*))) (flush)) Instead I'd like it to: (try the good stuff ... (flush) (catch Exception e (flush) (throw e))) Basically just let Java do what Java does when an unhandled exception is thrown (after flushing *out* to keep from confusing people). I know a lot of what's in clojure.main is meant to be useful for embedding in larger programs, but it doesn't look to me like the main function is intended for that. --http://elhumidor.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: clojure.main always exits with code 0
Submitted as http://code.google.com/p/clojure/issues/detail?id=106 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: clojure.main always exits with code 0
Rich, Can I submit an issue and patch for this? I have a CA on file. Thanks. -hume. On Sun, Apr 5, 2009 at 8:15 PM, John D. Hume duelin.mark...@gmail.com wrote: Currently it does this: (try the good stuff ... (catch Exception e (.printStackTrace e *err*))) (flush)) Instead I'd like it to: (try the good stuff ... (flush) (catch Exception e (flush) (throw e))) Basically just let Java do what Java does when an unhandled exception is thrown (after flushing *out* to keep from confusing people). I know a lot of what's in clojure.main is meant to be useful for embedding in larger programs, but it doesn't look to me like the main function is intended for that. -- http://elhumidor.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: clojure.main always exits with code 0
I have experienced this as well. My problem is that I would like my test suite to exit the proper way so that CI knows that the build actually failed. Currently test-is seems to just report to stdout, but not set anything that would cause the suite to fail with the proper exit code. Any ideas? Aaron On Apr 8, 2009, at 2:28 PM, Tom Faulhaber wrote: I'd like to second this request. It's pretty necessary to have an exit code for any type of scripting. Of course, you can always use (System/exit result-code), but a return value is prettier to me. - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
Re: clojure.main always exits with code 0
I'd like to second this request. It's pretty necessary to have an exit code for any type of scripting. Of course, you can always use (System/exit result-code), but a return value is prettier to me. On Apr 5, 5:15 pm, John D. Hume duelin.mark...@gmail.com wrote: Earlier today I was surprised to notice that some test-is unit tests I was running from Ant failed, but it still reported BUILD SUCCESSFUL. I figured I'd forgotten to include failonerror=true in the java task, but it was there. So I played around and found that $ java -cp clojure.jar clojure.main -e garbage java.lang.Exception: Unable to resolve symbol: garbage in this context (NO_SOURCE_FILE:0) at clojure.lang.Compiler.analyze(Compiler.java:4330) ...etc $ echo $? 0 Likewise with a script. This seems like a bug. Would it be acceptable to change clojure.main/main as follows? Currently it does this: (try the good stuff ... (catch Exception e (.printStackTrace e *err*))) (flush)) Instead I'd like it to: (try the good stuff ... (flush) (catch Exception e (flush) (throw e))) Basically just let Java do what Java does when an unhandled exception is thrown (after flushing *out* to keep from confusing people). I know a lot of what's in clojure.main is meant to be useful for embedding in larger programs, but it doesn't look to me like the main function is intended for that. Thanks. -hume. --http://elhumidor.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---
clojure.main always exits with code 0
Earlier today I was surprised to notice that some test-is unit tests I was running from Ant failed, but it still reported BUILD SUCCESSFUL. I figured I'd forgotten to include failonerror=true in the java task, but it was there. So I played around and found that $ java -cp clojure.jar clojure.main -e garbage java.lang.Exception: Unable to resolve symbol: garbage in this context (NO_SOURCE_FILE:0) at clojure.lang.Compiler.analyze(Compiler.java:4330) ...etc $ echo $? 0 Likewise with a script. This seems like a bug. Would it be acceptable to change clojure.main/main as follows? Currently it does this: (try the good stuff ... (catch Exception e (.printStackTrace e *err*))) (flush)) Instead I'd like it to: (try the good stuff ... (flush) (catch Exception e (flush) (throw e))) Basically just let Java do what Java does when an unhandled exception is thrown (after flushing *out* to keep from confusing people). I know a lot of what's in clojure.main is meant to be useful for embedding in larger programs, but it doesn't look to me like the main function is intended for that. Thanks. -hume. -- http://elhumidor.blogspot.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~--~~~~--~~--~--~---