Skip to content
Newer
Older
100644 12 lines (9 sloc) 395 Bytes
38e2bf2 @ckirkendall centralized error messages for registration and updating settings
ckirkendall authored
1 (ns foreclojure.messages)
2
3 (defn load-props [file]
4 (into {} (doto (java.util.Properties.)
5 (.load (-> (Thread/currentThread)
6 (.getContextClassLoader)
7 (.getResourceAsStream file))))))
a828338 @ckirkendall added sec msgs and extended msgs to take formatted strings
ckirkendall authored
8
9 (def err-msg-map (load-props "error-messages.properties"))
38e2bf2 @ckirkendall centralized error messages for registration and updating settings
ckirkendall authored
10
a2b4eba @ckirkendall changed the err-msgs function to err-msg
ckirkendall authored
11 (defn err-msg [key & args]
a828338 @ckirkendall added sec msgs and extended msgs to take formatted strings
ckirkendall authored
12 (apply format (cons (get err-msg-map key) args)))
Something went wrong with that request. Please try again.