This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cake swank | |
error evaluating: | |
((alter-var-root (var start-thread) (fn [start-thread] (fn [f] (start-thread (fn* [] (with-context (current-context) (f)))))))) | |
java.lang.NullPointerException: null | |
at clojure.lang.Reflector.invokeInstanceMethod (Reflector.java:26) | |
classlojure$invoke_in_STAR_.doInvoke (classlojure.clj:33) | |
clojure.lang.RestFn.invoke (RestFn.java:495) | |
classlojure$eval_in$fn__58.invoke (classlojure.clj:55) | |
classlojure$eval_in.doInvoke (classlojure.clj:51) | |
clojure.lang.RestFn.applyTo (RestFn.java:143) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns demo.core | |
(:use [ring.adapter.jetty :only (run-jetty)] | |
[ring.middleware.session :only (wrap-session)] | |
[ring.middleware.flash :only (wrap-flash)] | |
[ring.middleware.stacktrace :only (wrap-stacktrace)] | |
[hiccup.core :only (html)] | |
[hiccup.form-helpers :only (form-to label text-field submit-button)] | |
[hiccup.page-helpers :only (xhtml link-to unordered-list)] | |
[compojure.core :only (defroutes GET POST)] | |
[compojure.route :only (not-found)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn res-string | |
"Returns a string resource by keyword." | |
[{res ::resources} k] (get res k)) | |
(defn res-format | |
"Formats a keyed resource string using clojure.core/format. | |
Equivalent to (format (res-string k) ...)." | |
[request k & args] | |
(apply format (res-string request k) args)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject one-up "0.1.0-SNAPSHOT" | |
:description "Request Demo" | |
:dependencies [[org.clojure/clojure "1.2.0"] | |
[org.clojure/clojure-contrib "1.2.0"] | |
[ring/ring-core "0.3.3"] | |
[ring/ring-jetty-adapter "0.3.3"] | |
[compojure "0.5.2"] | |
[hiccup "0.3.0"]] | |
:dev-dependencies [[ring/ring-devel "0.3.3"] | |
[swank-clojure "1.2.1"]]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No message. | |
[Thrown class java.lang.NullPointerException] | |
Restarts: | |
0: [QUIT] Quit to the SLIME top level | |
Backtrace: | |
0: clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:263) | |
1: swank.core$exception_stacktrace.invoke(core.clj:125) | |
2: swank.core$build_backtrace.invoke(core.clj:183) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; this is a code fragement - it is missing necessary use / require | |
;; as well as dependent functions like do-validation and validation-errors | |
(defn form-action | |
"Build form action function for forms with validation. | |
success-fn is called with current request if validation succeeds. | |
failure-fn is called with current request (containing errors) | |
if validation fails. | |
(Though using this with no validators works, actions without validation | |
always call success-fn and so do not require this logic.)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns one-up.core | |
(:use [ring.adapter.jetty :only (run-jetty)] | |
[ring.middleware.session :only (wrap-session)] | |
[ring.middleware.flash :only (wrap-flash)] | |
[ring.middleware.file :only (wrap-file)] | |
[ring.middleware.file-info :only (wrap-file-info)] | |
[ring.middleware.reload :only (wrap-reload)] | |
[ring.middleware.stacktrace :only (wrap-stacktrace)] | |
[one-up.view :only (main-routes)] | |
one-up.middleware)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exception: | |
null | |
flash.clj:11 ring.middleware.flash/wrap-flash[fn] | |
file.clj:30 ring.middleware.file/wrap-file[fn] | |
file_info.clj:101 ring.middleware.file-info/wrap-file-info[fn] | |
reload.clj:14 ring.middleware.reload/wrap-reload[fn] | |
middleware.clj:23 one-up.middleware/wrap-bounce-favicon[fn] | |
middleware.clj:33 one-up.middleware/wrap-exception-logging[fn] | |
stacktrace.clj:59 ring.middleware.stacktrace/wrap-stacktrace[fn] | |
Var.java:365 clojure.lang.Var.invoke |