Please forgive this stupid question, but I'm still trying to understand
exactly what the double "::" means. I have read that I can use (derive) to
establish a hierarchy and I can imagine how this would be useful for things
like throwing errors and catching them and logging, but I've also read that
"::" adds the namespace to the symbol, so I would assume that I can not
match ::logging from one namespace with ::logging from another?
I'm thinking of this especially in my use of Slingshot, where I was
thinking of doing something like:
(throw+ {:type ::database-problem :message "something wrong in the database
query"})
and then at a higher level in my code I was going to catch it with
something like:
(derive ::database-problem ::logging)
and then using Dire:
(dire/with-handler! #'database/remove-this-item
[:type ::logging]
(fn [e & args]
(timbre/log (str " database/remove-this-item: The time : "
(dates/current-time-as-string) ( str e))))
but conceptually I am having trouble understanding how ::logging in one
namespace can match ::logging in another namespace. Perhaps I should just
use normal keywords?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.