brentonashworth/one — Issue #59: NPE when navigating to pages that don't exist
Author: transistorize
Created: 2012-01-12 04:17:31+00:00
State: open

I don't know if this a bug or "that's a feature" issue, but an NPE is thrown when you visit any sub-page that doesn't exist (yet).

__Steps to Reproduce__

* Do a fresh install.
* Start Server, ClojureScriptRepl
* In browser window, navigate to ```http://localhost:8080/design/example.html```.
* See NPE:

java.lang.NullPointerException
enlive_html.clj:53	net.cgrand.enlive-html/load-html-resource[fn]
enlive_html.clj:53	net.cgrand.enlive-html/load-html-resource
enlive_html.clj:86	net.cgrand.enlive-html/eval3045[fn]
MultiFn.java:167	clojure.lang.MultiFn.invoke
enlive_html.clj:69	net.cgrand.enlive-html/html-resource
templates.clj:70	one.templates/load-html
dev_server.clj:34	one.sample.dev-server/fn
core.clj:39	compojure.core/if-route[fn]
core.clj:24	compojure.core/if-method[fn]
core.clj:98	compojure.core/routing[fn]
core.clj:2388	clojure.core/some
core.clj:98	compojure.core/routing
RestFn.java:139	clojure.lang.RestFn.applyTo
core.clj:602	clojure.core/apply
core.clj:103	compojure.core/routes[fn]
reload.clj:55	one.reload/watch-cljs[fn]
file.clj:29	ring.middleware.file/wrap-file[fn]
dev_server.clj:52	one.sample.dev-server/rewrite-design-uris[fn]
file_info.clj:40	ring.middleware.file-info/wrap-file-info[fn]
templates.clj:77	one.templates/apply-templates[fn]
dev_server.clj:39	one.sample.dev-server/js-encoding[fn]
params.clj:76	ring.middleware.params/wrap-params[fn]
dev_server.clj:74	one.sample.dev-server/set-active-menu[fn]
stacktrace.clj:15	ring.middleware.stacktrace/wrap-stacktrace-log[fn]
stacktrace.clj:79	ring.middleware.stacktrace/wrap-stacktrace-web[fn]
reload.clj:76	one.reload/reload-clj[fn]
Var.java:401	clojure.lang.Var.invoke
jetty.clj:16	ring.adapter.jetty/proxy-handler[fn]
(Unknown Source)	ring.adapter.jetty.proxy$org.mortbay.jetty.handler.AbstractHandler$0.handle
HandlerWrapper.java:152	org.mortbay.jetty.handler.HandlerWrapper.handle
Server.java:326	org.mortbay.jetty.Server.handle
HttpConnection.java:542	org.mortbay.jetty.HttpConnection.handleRequest
HttpConnection.java:926	org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
HttpParser.java:549	org.mortbay.jetty.HttpParser.parseNext
HttpParser.java:212	org.mortbay.jetty.HttpParser.parseAvailable
HttpConnection.java:404	org.mortbay.jetty.HttpConnection.handle
SocketConnector.java:228	org.mortbay.jetty.bio.SocketConnector$Connection.run
QueuedThreadPool.java:582	org.mortbay.thread.QueuedThreadPool$PoolThread.run

__Expected Behavior__
* 404 page