On 3 June 2015 at 20:48, Elric Erkose <elric.erk...@gmail.com> wrote:
> The doc string for clojure.java.io/resource states that it returns a URL.
> When an invalid file is passed as the only parameter, it returns nil.
> Shouldn't we expect an Exception?
>
> user=> (clojure.java.io/resource "no-such-file")
> nil
>
> I'd say this was consistent with Clojure's other lookup functions. When we
lookup a value in a data structure that doesn't exist, nil is returned by
default, rather than an exception.

- James

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to