View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
This technique will only work for regular script errors.  Craig was actually asking about errors faised by the FoxWeb CGI and ISAPI modules.  In addition, your technique bypasses FoxWeb's default error handler, which may cause problems for the channel in future requests.  For example, the code you listed does not force the channel to clear and re-load all objects, nor does it log errors to the FoxWeb error log.

FoxWeb Support Team
support@foxweb.com

Sent by Oleg Goncharuk on 03/22/2002 01:22:15 AM:
I had found solution that works both 1.xx and 2.xx with backward compatibility:

*Decalare error handler at the start of program:
on error ShowError(ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( ))
*Create "ON ERROR" function like this:

function ShowError
Parameter merror, Mess, mess1, mprog, mlineno
cHtm=""
* Fill cHTM with Your error message in HTML format
cHTM=MergeTxt(cHTM)
HTML_OUT="Content-type: text/html"+Chr(10)+Chr(10)+cHTM
Return To www_read

/Oleg

Sent by FoxWeb Support on 03/14/2002 12:58:01 PM:
No, this is a feature introduced in version 2.

FoxWeb Support Team
support@foxweb.com

Sent by Craig Raber on 03/14/2002 12:22:46 PM:
I left out the part about us being on 1.X still. Is there a way to customize in this version? Will the StubError registry setting work in 1.X?

Sent by FoxWeb Support on 03/13/2002 08:07:25 PM:
Regular script errors can be formated by using a different error template, as described in the FoxWeb Configuration page.

Errors that are not returned by scripts can also be customized, but the procedure is a little more difficult.  To customize these errors you will need to add a new value named "StubError" in the FoxWeb registry key (hklm\software\Aegis Group\FoxWeb\CurrentVersion).  FoxWeb will return exactly what you enter in this value.  The string "%error%" can be used to merge in the actual error message:

StubError="<body><h3>An Error has Occurred</h3>Message: %error%</body>"

FoxWeb Support Team
support@foxweb.com

Sent by Craig Raber on 03/13/2002 02:15:55 PM:
Is there a way to customize the error messages returned to the end-user when there is a Foxweb error. i.e. when the program times out?