Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improvind the Condition treatment code... from handle to rescue

  • Loading branch information...
commit 2a465ce628684912f02e9a3e5f000885d5ae177e 1 parent 5b70944
@felipero authored
Showing with 2 additions and 10 deletions.
  1. +2 −10 src/ioke/ikido.ik
View
12 src/ioke/ikido.ik
@@ -6,24 +6,16 @@ Ikido dispatch = method(path,
pathInfo = treatPath(path)
-; result = {status: 404, headers:{contentType:"text/html"}, content:"404: Resource not found."}
result = Dict mimic
- nonExistentAction = false
-
bind(
- handle(Condition Error Load,
+ rescue(Condition Error Load,
fn(c,
- result = {status: 404, headers:{contentType:"text/html"}, content:"404: Resource not found."}. ;"No such controller defined" println
- nonExistentAction = true
- invokeRestart(:ignoreLoadError)
+ result = {status: 404, headers:{contentType:"text/html"}, content:"404: Resource not found."}
)
),
-
use("../../test/_controllers/#{pathInfo[:controller]}_controller.ik")
- )
- unless(nonExistentAction,
result = {status: 200, headers: {contentType:"text/html"}, content:"The correct content from simple controller"}
)
Please sign in to comment.
Something went wrong with that request. Please try again.