PDA

View Full Version : AV in ISAPI not getting emailed


begge
15-Jun-2005, 04:21 PM
I am using EL 4.6.7

I have an ISAPI app that creates an access violation and I am not getting an email notification of the error.

This is the routine that creates it
(I can send you full source to this app if you need it)


implementation
var
GConn: Connection = nil;
GConnLock: TCriticalSection = nil;

function GetConn: Connection;
begin
// This line creates the AV because I forgot to create the instance in the unit initialization section
GConnLock.Enter;
try
if GConn = nil then
GConn:= OpenMSAccess(TAppDirectories.GlobalInstance.Databa se + 'DB.mdb');

Result:= GConn;
finally
GConnLock.Leave;
end;
end;

admin
15-Jun-2005, 04:30 PM
Yes, please.
Can you send a source demo to me?

begge
16-Jun-2005, 06:55 PM
I sent you a zip file to support@eurekalog.com

admin
20-Jun-2005, 10:39 AM
I'm sorry but EurekaLog did not handled SOAP services.
But you can handled it using EurekaLog manually.

Try to add the following code to your Web Service (adding a new TEurekaLog component before).

PS: I don't know the SOAP service so I suppose the it returns HTML code, if it isn't so then try to modify the code or rewrite tome to solve the problem together.



// -------------------------------------
// NOTE: Add a new TEurekaLog component.
// -------------------------------------

var
LastExceptionHTMLCode: string; // To store the exception text HTML code.

// EVENT : TEurekaLog.OnExceptionNotify
// COMMENT: Generate and capture the HTML code (from the "exception text").
procedure TWSMPayNotify.EurekaLog1ExceptionNotify(
EurekaExceptionRecord: TEurekaExceptionRecord; var Handled: Boolean);
begin
LastExceptionHTMLCode := GenerateHTML(
EurekaExceptionRecord.LogText, // Exception Log plain text
True); // Add the JavaScript 'back' button at the page bottom
end;

// EVENT : TWSMPayNotify.OnExceptionEvent
// COMMENT: Send the HTML code (generated from the "exception text").
procedure TWSMPayNotify.HTTPSoapPascalInvoker1ExceptionEvent (
const MethodName: String; const Request, Response: TStream);
begin
Response.Write(LastExceptionHTMLCode[1], Length(LastExceptionHTMLCode));
end;