Changeset 12537 in project


Ignore:
Timestamp:
11/16/08 21:38:45 (12 years ago)
Author:
sjamaan
Message:

Document build-error-message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/spiffy

    r12535 r12537  
    176176procedure which returns a "404 Not found".
    177177
     178<parameter>(handle-exception [proc])</parameter>
     179
     180The handler for when an exception occurs. This defaults to a procedure
     181that logs the error to the error log. While debugging or developing, it
     182may be more convenient to use a procedure that sends the error back to
     183the client:
     184
     185<enscript highlight=scheme>
     186(handle-exception
     187  (lambda (exn chain)
     188    (send-status 500 "Internal server error" (build-error-message exn chain))))
     189</enscript>
     190
    178191<parameter>(handle-access-logging [proc])</parameter>
    179192
     
    330343Encode "special" html symbols like tag and attribute characters so
    331344they will not be interpreted by the browser.
     345
     346<procedure>(build-error-message exn chain [raw-output])</procedure>
     347
     348Build an error message for the exception {{exn}}, with call chain
     349{{chain}}. Defaults to HTML output, unless {{raw-output}} is given and
     350nonfalse.
    332351
    333352=== Modules
Note: See TracChangeset for help on using the changeset viewer.