logo

Response

« Return to the main article

You are viewing this page out of context. To see it in the context it is intended please click here.

About This Page

Reply posted by Pat Read on Thu 14 Mar 2002 in response to What you need and want to know about errors

Simpler alternative?

Couldn't you just put a computed-for-display text field on the error form, that
runs an @mailsend formula?


This can either send to the developer or to a mail-in-database. I had a bash
and am pretty happy with the results; here's an example:


Add a field called "ErrorSummary" at the bottom of your error form,
(text/comp-for-display only) with formula:


"Request: " +
@If(HTTPS="ON";"https://";"http://")+server_name+Path_Info+@NewLine+
"Referer: "+HTTP_Referer+@NewLine+
"Browser: "+HTTP_User_Agent+@NewLine+
"Query_String: "+Query_String_Decoded+@NewLine+
"Host: "+Remote_Host+@NewLine+
"IP: "+Remote_Addr


(Make sure the CGI variables quoted have matching fields already)


Then add your mailsend field with this formula:


@MailSend("HTTPErrorLog";"";"";MessageString;"Details below:";"ClientSummary")


Maybe I'm missing something - it's too simple!!


Pat.