summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hintz <t@thintz.com>2015-08-01 11:10:50 -0700
committerThomas Hintz <t@thintz.com>2015-08-01 11:10:50 -0700
commitc5ae5c5e58d1e1f54b60ca69c72233a7d8f0c582 (patch)
treeffd744f6af43c4023bf593629a3f2cd668747fad
parentc64ca08f1c41de3d5026ed6a4e976aa244f488e0 (diff)
downloadsimple-c5ae5c5e58d1e1f54b60ca69c72233a7d8f0c582.tar.gz
Removing unused procedures.
-rw-r--r--simple.scm25
1 files changed, 3 insertions, 22 deletions
diff --git a/simple.scm b/simple.scm
index e8ddd08..54cf6d1 100644
--- a/simple.scm
+++ b/simple.scm
@@ -1,9 +1,9 @@
(module simple
- (server-response-headers sid page-exception-message enable-session
+ (server-response-headers sid enable-session
add-request-handler-hook! remove-request-handler-hook!
define-page redirect-to enable-session-cookie session-cookie-setter
session-cookie-name $session $session-set! $ page-access-denied-message
- debug-file page-access-control server-start $session-destroy!
+ page-access-control server-start $session-destroy!
add-post-request-handler-hook!)
(import scheme chicken data-structures utils extras ports srfi-69 files srfi-1)
@@ -11,13 +11,9 @@
(use intarweb spiffy spiffy-request-vars uri-common
http-session spiffy-cookies sxml-transforms)
-(define debug-file (make-parameter #f))
(define server-response-headers (make-parameter #f))
(define sid (make-parameter #f))
-(define page-exception-message
- (make-parameter
- (lambda (exn)
- '(<h3> "An error has occurred while processing your request."))))
+
(define enable-session (make-parameter #f))
(define enable-session-cookie (make-parameter #t))
(define session-cookie-name (make-parameter "awful-cookie"))
@@ -87,26 +83,11 @@
(%error #f)
(%page-title #f))
-(define (debug . args)
- (when (debug-file)
- (with-output-to-file (debug-file)
- (lambda ()
- (print (concat args)))
- append:)))
-
(define-inline (use-session? use-session)
(or (not (enable-session))
use-session
(and (enable-session) (session-valid? (sid)))))
-(define-inline (render-exception exn)
- (%error exn)
- (debug (with-output-to-string
- (lambda ()
- (print-call-chain)
- (print-error-message exn))))
- ((page-exception-message) exn))
-
(define-inline (maybe-create/refresh-session! use-session)
(when use-session
(if (session-valid? (sid))