EurekaLog newsgroups
  #1  
Old 20-Sep-2005, 04:33 PM
ntodorov ntodorov is offline
Junior Member
 
Join Date: Sep 2005
Posts: 7
Default Safecall and log file.

Hi!

I have Appserver (remote data modules, midas) and I want to know are there any options to more detailed control showing and logging exceptions?
I use this: Show exception dialog – false, it is needed because my AppServer runs on a remote PC using DCOM. The problem is that:

Procedure TMyRemoteDataModule.Test; 
//declared as safecall or not – result is the same
begin
  raise Exception.Create(‘exception here’); 
//Dons’t raise up on Client app, only saved on AppServer-exe.elf
end;
but ->


Procedure TMyRemoteDataModule.Test; 
//declared as safecall or not – result is the same
Begin
  try
    raise Exception.Create(‘exception here’); 
  finally
    raise; 
  end;
//Raised on Client app, and not saved on AppServer-exe.elf
end;
My question is : Can Eureka send all raised exceptions (safecall or not) to client side (without try/except construction)? And is there eureka option for logging every exception?
I need to show every exception on client side and log it on AppServers elf.
Reply With Quote
  #2  
Old 23-Sep-2005, 07:51 AM
admin
Guest
 
Posts: n/a
Default Re: Safecall and log file.

ntodorov wrote:
> Hi!
>
> I have Appserver (remote data modules, midas) and I want to know are
> there any options to more detailed control showing and logging
> exceptions?
> I use this: Show exception dialog – false, it is needed because my
> AppServer runs on a remote PC using DCOM. The problem is that:
>
>
> Code:
> --------------------
> Procedure TMyRemoteDataModule.Test;
> //declared as safecall or not – result is the same
> begin
> raise Exception.Create(‘exception here’);
> //Dons’t raise up on Client app, only saved on AppServer-exe.elf
> end;
> --------------------
>
> but ->
>
>
>
> Code:
> --------------------
> Procedure TMyRemoteDataModule.Test;
> //declared as safecall or not – result is the same
> Begin
> try
> raise Exception.Create(‘exception here’);
> finally
> raise;
> end;
> //Raised on Client app, and not saved on AppServer-exe.elf
> end;
> --------------------
>
>
> My question is : Can Eureka send all raised exceptions (safecall or
> not) to client side (without try/except construction)?


Handled all raised exception in client side it's really impossible. How
can client handle exceptions raised only in the server?

> And is there eureka option for logging every exception?


No, I'm sorry.

> I need to show every exception on client side and log it on AppServers
> elf.


If the server is placed in a local network you can save all the
exception logs in a unique .elf file, setting the EurekaLog Output File
to a specific net path (ex: '\\pc_server\c\logs\project_name.elf').


--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.
Reply With Quote
  #3  
Old 03-Oct-2005, 07:03 AM
ntodorov ntodorov is offline
Junior Member
 
Join Date: Sep 2005
Posts: 7
Default

> >My question is : Can Eureka send all raised exceptions (safecall or
>> not) to client side (without try/except construction)?


>Handled all raised exception in client side it's really impossible. How
>can client handle exceptions raised only in the server?

COM(DCOM) sends exceptions to server, when exception is in safecall method. The problem is that eureka prevent this in some cases (see first post). Is it a bug?
Reply With Quote
  #4  
Old 03-Oct-2005, 08:33 AM
admin
Guest
 
Posts: n/a
Default Re: Safecall and log file.

ntodorov wrote:
>>>My question is : Can Eureka send all raised exceptions (safecall or
>>>not) to client side (without try/except construction)?

>
>
>>Handled all raised exception in client side it's really impossible.

>
> How
>
>>can client handle exceptions raised only in the server?

>
>
> COM(DCOM) sends exceptions to server, when exception is in safecall
> method. The problem is that eureka prevent this in some cases (see
> first post). Is it a bug?


It isn't a bug but an EurekaLog behavior.

EurekaLog handled every exception raised into a SafeCall method before
that the Client send the exception to the Server, to avoid to lose the
original Client call-stack.

The Server shows only its internal call-stack hiding the original Client
call-stack!

BTW in the next versions I'll add a new options so to choose if use or
not this behavior.

I hope to have answered to your question, otherwise don't hesitate to
recontact to me, ok?

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.
Reply With Quote
  #5  
Old 04-Oct-2005, 07:44 AM
ntodorov ntodorov is offline
Junior Member
 
Join Date: Sep 2005
Posts: 7
Thumbs up

It would be cool to have this option!

Because now I can’t use Eureka on my old app servers – every method must be in try/except, otherwise some exception are only logged and users aren’t got informed. Any ideas to workaround this?
Reply With Quote
  #6  
Old 04-Oct-2005, 05:07 PM
admin
Guest
 
Posts: n/a
Default Re: Safecall and log file.

ntodorov wrote:
> It would be cool to have this option!
>
> Because now I can’t use Eureka on my old app servers – every method
> must be in try/except, otherwise some exception are only logged and
> users aren’t got informed. Any ideas to workaround this?


No, I'm sorry.
I haven't planned it again.

But if you want I can suggest to you the source modifications needed to
can change the standard EurekaLog behavior.

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.
Reply With Quote
  #7  
Old 11-Oct-2005, 11:17 AM
ntodorov ntodorov is offline
Junior Member
 
Join Date: Sep 2005
Posts: 7
Thumbs up

Quote:
Originally Posted by admin

But if you want I can suggest to you the source modifications needed to
can change the standard EurekaLog behavior.
Yes, tell me please.
Reply With Quote
  #8  
Old 12-Oct-2005, 01:39 PM
admin
Guest
 
Posts: n/a
Default Re: Safecall and log file.

ntodorov wrote:
> admin Wrote:
>
>>
>>But if you want I can suggest to you the source modifications needed
>>to
>>can change the standard EurekaLog behavior.
>>
>>

>
>
> Yes, tell me please.


Replace the ExceptionLog.ExceptionTypeByAddr function with the following:


//--------------------------------------------------------
function ExceptionTypeByAddr(Addr: DWord): TExceptionType;
var
GoAddr: DWord;
begin
Result := etUnknown;
Inc(Addr);
if IsValidBlockAddr(Addr, SizeOf(Addr)) then
begin
GoAddr := ConvertAddress(Addr + PDWord(Addr)^ + 4);
if (GoAddr = HandleAnyExceptionAddr_Variable) then
Result := etHandleAnyException
else
if (GoAddr = HandleOnExceptionAddr_Variable) then
Result := etHandleOnException
{ else
if (GoAddr = HandleAutoExceptionAddr_Variable) then
Result := etHandleAutoException;}
end;
end;
//--------------------------------------------------------

--
Best regards...

Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG showing line n.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem if *proj file and the project source file don't have the same name Unregistered Bugreports 3 22-Mar-2010 09:16 AM
About "SafeCall exceptions" Michel Lefebvre General 1 12-Nov-2009 10:45 AM
safecall exceptions inside try/catch blocks Skampler General 3 24-Jun-2008 06:52 AM
SafeCall exception in threads created by BeginThrrad or CreateTherad functins Pavel Tupec Bugreports 3 13-May-2008 08:22 AM

All times are GMT. The time now is 11:14 AM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © EurekaLab s.a.s. - VAT ID: IT05554520824