 
 (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"))

  (when (and (not (snapshot-version? version))
          (.exists (io/file (config :repo) (string/replace group-id "." "/")
                     artifact-id version filename)))
    (throw (ex-info "redeploying non-snapshots is not allowed" {}))))

(defn validate-deploy [group-id artifact-id version filename]
  (try

    ;; 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
