Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Avoid prefix lists and contrib in wrapping example.

  • Loading branch information...
commit 2930415839a26e3afd6f1f9f7313824077a1b59e 1 parent 91c4dc8
@mmcgrana authored
Showing with 6 additions and 5 deletions.
  1. +6 −5 example/wrapping.clj
View
11 example/wrapping.clj
@@ -1,15 +1,16 @@
; A example of modular construction of Ring apps.
(ns ring.example.wrapping
- (:use (ring.handler dump)
- (ring.middleware stacktrace file-info file)
- (ring.adapter jetty)
- (clojure.contrib except)))
+ (:use ring.handler.dump
+ ring.middleware.stacktrace
+ ring.middleware.file-info
+ ring.middleware.file
+ ring.adapter.jetty))
(defn wrap-error [app]
(fn [req]
(if (= "/error" (:uri req))
- (throwf "Demonstrating ring.middleware.stacktrace")
+ (throw (Exception. "Demonstrating ring.middleware.stacktrace"))
(app req))))
(def app
Please sign in to comment.
Something went wrong with that request. Please try again.