The clack-errors Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The clack-errors Reference Manual

This is the clack-errors Reference Manual, version 0.2, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:38:09 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

clack-errors

Build Status Quicklisp

Development screenshot Production screenshot

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.

Usage

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.

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.

(clack:clackup
  (funcall clack-errors:*clack-error-middleware*
    *app*
    :fn (lambda (condition) "500 Internal Server Error")))

License

Copyright (c) 2013-2016 Fernando Borretti (eudoxiahp@gmail.com)

Licensed under the LLGPL License.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 clack-errors

Author

Fernando Borretti

Home Page

https://github.com/eudoxia0/clack-errors

License

LLGPL

Description

Error page middleware for Clack.

Long Description

# clack-errors

[![Build Status](https://travis-ci.org/eudoxia0/clack-errors.svg?branch=master)](https://travis-ci.org/eudoxia0/clack-errors) [![Quicklisp](http://quickdocs.org/badge/clack-errors.svg)](http://quickdocs.org/clack-errors/)

![Development screenshot](https://raw.github.com/eudoxia0/clack-errors/master/screenshot-dev.png)
![Production screenshot](https://raw.github.com/eudoxia0/clack-errors/master/screenshot-prod.png)

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-2016 Fernando Borretti (eudoxiahp@gmail.com)

Licensed under the LLGPL License.

Version

0.2

Dependencies
Source

clack-errors.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 clack-errors/src

Parent

clack-errors (system)

Location

src/

Component

clack-errors.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 clack-errors.asd

Location

clack-errors.asd

Systems

clack-errors (system)


Previous: , Up: Lisp files   [Contents][Index]

4.1.2 clack-errors/src/clack-errors.lisp

Parent

src (module)

Location

src/clack-errors.lisp

Packages

clack-errors

Exported Definitions

*clack-error-middleware* (special variable)

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 clack-errors

Source

clack-errors.lisp (file)

Nickname

lack.middleware.clack.errors

Use List

common-lisp

Exported Definitions

*clack-error-middleware* (special variable)

Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Special variables

Special Variable: *clack-error-middleware*
Package

clack-errors

Source

clack-errors.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

6.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

6.2.1 Special variables

Special Variable: *dev-css-path*
Package

clack-errors

Source

clack-errors.lisp (file)

Special Variable: *highlight-css*
Package

clack-errors

Source

clack-errors.lisp (file)

Special Variable: *highlight-js*
Package

clack-errors

Source

clack-errors.lisp (file)

Special Variable: *prod-css-path*
Package

clack-errors

Source

clack-errors.lisp (file)

Special Variable: +backtrace-regex+

A regular expression to split backtraces

Package

clack-errors

Source

clack-errors.lisp (file)

Special Variable: +dev-template+
Package

clack-errors

Source

clack-errors.lisp (file)

Special Variable: +prod-template+
Package

clack-errors

Source

clack-errors.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

6.2.2 Functions

Function: condition-name CONDITION
Package

clack-errors

Source

clack-errors.lisp (file)

Function: condition-slots CONDITION
Package

clack-errors

Source

clack-errors.lisp (file)

Function: parse-backtrace BT
Package

clack-errors

Source

clack-errors.lisp (file)

Function: render BT CONDITION ENV
Package

clack-errors

Source

clack-errors.lisp (file)

Function: render-prod CONDITION ENV
Package

clack-errors

Source

clack-errors.lisp (file)

Function: slot-values OBJ
Package

clack-errors

Source

clack-errors.lisp (file)

Function: split-backtrace STR
Package

clack-errors

Source

clack-errors.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
clack-errors.asd: The clack-errors<dot>asd file
clack-errors/src: The clack-errors/src module
clack-errors/src/clack-errors.lisp: The clack-errors/src/clack-errors<dot>lisp file

F
File, Lisp, clack-errors.asd: The clack-errors<dot>asd file
File, Lisp, clack-errors/src/clack-errors.lisp: The clack-errors/src/clack-errors<dot>lisp file

L
Lisp File, clack-errors.asd: The clack-errors<dot>asd file
Lisp File, clack-errors/src/clack-errors.lisp: The clack-errors/src/clack-errors<dot>lisp file

M
Module, clack-errors/src: The clack-errors/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   F   P   R   S  
Index Entry  Section

C
condition-name: Internal functions
condition-slots: Internal functions

F
Function, condition-name: Internal functions
Function, condition-slots: Internal functions
Function, parse-backtrace: Internal functions
Function, render: Internal functions
Function, render-prod: Internal functions
Function, slot-values: Internal functions
Function, split-backtrace: Internal functions

P
parse-backtrace: Internal functions

R
render: Internal functions
render-prod: Internal functions

S
slot-values: Internal functions
split-backtrace: Internal functions

Jump to:   C   F   P   R   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
S  
Index Entry  Section

*
*clack-error-middleware*: Exported special variables
*dev-css-path*: Internal special variables
*highlight-css*: Internal special variables
*highlight-js*: Internal special variables
*prod-css-path*: Internal special variables

+
+backtrace-regex+: Internal special variables
+dev-template+: Internal special variables
+prod-template+: Internal special variables

S
Special Variable, *clack-error-middleware*: Exported special variables
Special Variable, *dev-css-path*: Internal special variables
Special Variable, *highlight-css*: Internal special variables
Special Variable, *highlight-js*: Internal special variables
Special Variable, *prod-css-path*: Internal special variables
Special Variable, +backtrace-regex+: Internal special variables
Special Variable, +dev-template+: Internal special variables
Special Variable, +prod-template+: Internal special variables

Jump to:   *   +  
S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
clack-errors: The clack-errors system
clack-errors: The clack-errors package

P
Package, clack-errors: The clack-errors package

S
System, clack-errors: The clack-errors system

Jump to:   C   P   S