Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the clack-errors Reference Manual, version 0.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Aug 15 04:11:03 2022 GMT+0.
Next: Systems, Previous: The clack-errors Reference Manual, Up: The clack-errors Reference Manual [Contents][Index]
A clone of better_errors for Clack.
By default, when Clack throws an exception when rendering a page, the server waits for the response until it times out while the exception waits in the REPL. This isn't very useful. So now there's this.
This,
(clack:clackup
(funcall clack-errors:*clack-error-middleware*
*my-clack-app*
:debug t)
:port 8000)))
will wrap your Clack up in the clack-errors middleware, start the server and return a handler object.
By default, the middleware will show all information. In a production
environment, you'll want to initialize this with the :debug
parameter set to
NIL.
The middleware can be initialized with the :fn
slot set to a lambda that takes
a condition as its argument and returns the HTML string to return to the client.
(clack:clackup
(funcall clack-errors:*clack-error-middleware*
*app*
:fn (lambda (condition) "500 Internal Server Error")))
Copyright (c) 2013–2019 Fernando Borretti (eudoxiahp@gmail.com)
Licensed under the LLGPL License
Next: Modules, Previous: Introduction, Up: The clack-errors Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Error page middleware for Clack.
Fernando Borretti
LLGPL
# clack-errors
[](https://travis-ci.org/eudoxia0/clack-errors)
[](http://quickdocs.org/clack-errors/)


A clone of [better_errors](https://github.com/charliesome/better_errors)
for [Clack](https://github.com/fukamachi/clack).
By default, when Clack throws an exception when rendering a page, the server
waits for the response until it times out while the exception waits in the
REPL. This isn’t very useful. So now there’s this.
# Usage
This,
“‘lisp
(clack:clackup
(funcall clack-errors:*clack-error-middleware*
*my-clack-app*
:debug t)
:port 8000)))
“‘
will wrap your Clack up in the clack-errors middleware, start the server and
return a handler object.
By default, the middleware will show all information. In a production
environment, you’ll want to initialize this with the ‘:debug‘ parameter set to
NIL.
## Using a Custom Error Page
The middleware can be initialized with the ‘:fn‘ slot set to a lambda that takes
a condition as its argument and returns the HTML string to return to the client.
“‘lisp
(clack:clackup
(funcall clack-errors:*clack-error-middleware*
*app*
:fn (lambda (condition) "500 Internal Server Error")))
“‘
# License
Copyright (c) 2013–2019 Fernando Borretti (eudoxiahp@gmail.com)
Licensed under the LLGPL License.
0.2
src (module).
Next: Files, Previous: Systems, Up: The clack-errors Reference Manual [Contents][Index]
Modules are listed depth-first from the system components tree.
clack-errors (system).
clack-errors.lisp (file).
Next: Packages, Previous: Modules, Up: The clack-errors Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: clack-errors/src/clack-errors.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
clack-errors (system).
Previous: clack-errors/clack-errors.asd, Up: Lisp [Contents][Index]
src (module).
*clack-error-middleware* (special variable).
Next: Definitions, Previous: Files, Up: The clack-errors Reference Manual [Contents][Index]
Packages are listed by definition order.
lack.middleware.clack.errors
common-lisp.
*clack-error-middleware* (special variable).
Next: Indexes, Previous: Packages, Up: The clack-errors Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Previous: Public Interface, Up: Public Interface [Contents][Index]
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Internals, Up: Internals [Contents][Index]
A regular expression to split backtraces
Previous: Special variables, Up: Internals [Contents][Index]
Previous: Definitions, Up: The clack-errors Reference Manual [Contents][Index]
Jump to: | C F P R S |
---|
Jump to: | C F P R S |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | *
+
S |
---|
Jump to: | *
+
S |
---|
Jump to: | C F M P S |
---|
Jump to: | C F M P S |
---|