 
 (defn- validate-regex [x re message]
   (when-not (re-matches re x)
-    (throw (ex-info (str message " (" re ")")
-             {:value x
-              :regex re}))))
+    (throw (ex-info message {:value x
+                             :regex re}))))
 
 (defn snapshot-version? [version]
   (.endsWith version "-SNAPSHOT"))

    ;; compatible for everyone let's lock it down.
    (validate-regex version #"^[a-zA-Z0-9_.+-]+$"
      (str "version strings must consist solely of letters, "
        "numbers, dots, pluses, hyphens and underscores"))
    (assert-non-redeploy group-id artifact-id version filename)
    (catch Exception e
      (throw (ex-info (.getMessage e)
               (assoc (ex-data e)
                 :status 403
                 :status-message (str "Forbidden - " (.getMessage e))
                 :group-id group-id
                 :artifact-id artifact-id
                 :version version
                 :file filename))))))

(defn event-log-file [type]
  (io/file (config :event-dir) (str (name type) ".clj")))

    ;; OSes, URLs and tools.
    (validate-regex artifact-id #"^[a-z0-9_.-]+$"
      (str "project names must consist solely of lowercase "
        "letters, numbers, hyphens and underscores (see http://git.io/vO2Uy)"))
    (validate-regex group-id #"^[a-z0-9_.-]+$"
      (str "group names must consist solely of lowercase "
        "letters, numbers, hyphens and underscores (see http://git.io/vO2Uy)"))
    ;; Maven's pretty accepting of version numbers, but so far in 2.5 years
    ;; bar one broken non-ascii exception only these characters have been used.
    ;; Even if we manage to support obscure characters some filesystems do not
