On Jan 25, 2:47 am, Aaron Cohen <aa...@assonance.org> wrote: > On Mon, Jan 24, 2011 at 2:27 PM, Shantanu Kumar > > <kumar.shant...@gmail.com> wrote: > > I noticed that in 'with-open' macro the .close() method is called > > without wrapping in another try-catch block. Exceptions raised in the > > finally block prevails over the exception raised in the try block. Is > > this intended behavior or I am missing something? > > > Is there an alternative where the exceptions raised due to > > invoking .close() can be ignored? > > Why not do: > > (with-open [reader (Reader.)] > (try > ... > (catch) > ) > > Rather than putting the try outside the with-open?
That won't solve it because .close() works at 'with-open' level and overrides (when it raises an exception) the body of code I pass to the 'with-open' macro. You can verify this with Ken Wesson's code example in this thread. Regards, Shantanu -- 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 Note that posts from new members are moderated - please be patient with your first post. 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