Permalink
Browse files

Avoid prefix lists and contrib in wrapping example.

  • Loading branch information...
1 parent 91c4dc8 commit 2930415839a26e3afd6f1f9f7313824077a1b59e @mmcgrana committed Oct 26, 2010
Showing with 6 additions and 5 deletions.
  1. +6 −5 example/wrapping.clj
View
@@ -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

0 comments on commit 2930415

Please sign in to comment.