PDA

View Full Version : GetLastExceptionCallStack return NULL in C++Builder


Pavel Tupec
23-Nov-2007, 07:49 AM
Hi Fabio,
I have a problem with function GetLastExceptionCallStack in C++Builder.
Functions returns NULL. But function ShowLastExceptionData works fine.
I use latest EurekaLog 6.0.10.
This Delphi code works fine:
var
CallStackList: TStringList;
CallStack: TEurekaStackList;
result : string;
begin
try
raise Exception.Create('Original exception!'); // <-- Will be displayed
this line as exception line!
except
CallStackList := TStringList.Create;
try
CallStack := GetLastExceptionCallStack;
try
CallStackToStrings(CallStack, CallStackList);
result := CallStackList.Text;
finally
CallStack.Free;
end;
finally;
CallStackList.Free;
end;
end;
end;

but the same code on CBuilder doesn't work:
try
{
throw Sysutils::Exception("My violation");
}
catch(Sysutils::Exception &e)
{
Classes::TStringList * pExStackList = new Classes::TStringList;
Exceptionlog::TEurekaStackList * pEurekaCS =
GetLastExceptionCallStack();
if (pEurekaCS) {
CallStackToStrings(pEurekaCS, pExStackList);
// do something...
delete pEurekaCS;
}
if (pExStackList) delete pExStackList;
}

What I do wrong?

Pavel Tupec

admin
23-Nov-2007, 03:43 PM
Hi,

send to me a full project able to reproduce it, please.

Pavel Tupec
23-Nov-2007, 09:05 PM
I wrote small application where I demonstrate LastExceptionCallStack bug as
you wish :-)
File ExceptionPascal.pas contains simple function, whera I generate
exception and then I call EurekaLog functions to obtain call stack info.
If I compile this file by Delphi, then it works fine and I have call stack
info, but
If I compile this same pascal file by Borland C++ (6 or BDS2006) or the
equivalent code on C++, functions doesnt work.

admin
29-Nov-2007, 04:23 PM
I'm working on, please to be patient! :)

admin
29-Nov-2007, 09:45 PM
Hi,

I have just found and fixed this issue in the last EurekaLog 6.0.11 RC 2.

Try it and tell back to me your results, OK? :)

Pavel Tupec
30-Nov-2007, 08:29 AM
Hi,
I tried your latest release and I can confirm that the function
GetLastExceptionCallStack works fine now.
Thank you.

Pavel


"admin" <support@eurekalog.com> píše v diskusním příspěvku
news:77dc71e5f03eac1c7c459ffbc0ee73ab@nntp-gateway.com...
>
> Hi,
>
> I have just found and fixed this issue in the last EurekaLog 6.0.11 RC
> 2.
>
> Try it and tell back to me your results, OK? :)
>
>
> --
> admin
>
> Best regards...
>
> Fabio Dell'Aria.
> ------------------------------------------------------------------------
> admin's Profile: http://news.eurekalog.com/member.php?userid=1
> View this thread: http://news.eurekalog.com/showthread.php?t=1819
>

admin
30-Nov-2007, 09:22 AM
Perfect! :)