Log Error question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Log Error question

Bruno Brasesco
Hi All,

How can I add a Log Error to my application ?

When an Object do not understand a message I want to write the context of
the error to a text File.

The problem is that:
DevelopmentSessionManager current logError: anException.

I can't hold the an Exception because when an Object do not undestand a
message (#doNotUnderstand: message) answer aDevelopmentSessionManager and I
can't hold the Exception.

Best Regards
Bruno


Reply | Threaded
Open this post in threaded view
|

Re: Log Error question

Bill Schwab-2
Bruno,

> How can I add a Log Error to my application ?
>
> When an Object do not understand a message I want to write the context of
> the error to a text File.
>
> The problem is that:
> DevelopmentSessionManager current logError: anException.
>
> I can't hold the an Exception because when an Object do not undestand a
> message (#doNotUnderstand: message) answer aDevelopmentSessionManager and
I
> can't hold the Exception.

Can you say more about what you mean by "can't hold the exception"?

Are you aware of Dolphin's existing logging behavior?  The IDE logs
callstacks to Dolphin.errors, and uses the crash dump to do something
similar in deployed apps (look for appname.errors).  Are you trying to do
something different?  Are you trying to do this in a deployed application or
during development?

I have apps that expect to have a little more control over when and where
they write error information, and had some problems starting with D4 because
Lagoon was stripping code that I need - Blair helped me get around them
(well, all but one minor problem that I haven't reported to him yet<g>).

The other thing that comes to mind when you say "can't hold the exception"
is that you might be trying to transfer exception info from one thread to
another.  If that's the case, you would need to trap the exception on the
failing thread, get its description, etc. there, and then signal another
error on the thread that you want to report the error.  In short, you can't
query the exception from a thread other than the one that raised it.  I'm
guessing this is _not_ your problem though.

Is any of this helpful?

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

RE: Log Error question

Bruno Brasesco
Hi,

I'm trying to add an 'Application.Errors' file to my application, like
Dolphin.Errors.

But I can't write to a File when anException appears.

When anException occurs aWalkBackDialog arise and you have the error context
in this Dialog.

I want to catch anException to use: DevelopmentSessionManager current
logError: anException.
Or something like that in order to know what object crash in my application.

Best Regards
Bruno


Reply | Threaded
Open this post in threaded view
|

Re: Log Error question

Bill Schwab-2
Bruno,

> I'm trying to add an 'Application.Errors' file to my application, like
> Dolphin.Errors.
>
> But I can't write to a File when anException appears.
>
> When anException occurs aWalkBackDialog arise and you have the error
context
> in this Dialog.
>
> I want to catch anException to use: DevelopmentSessionManager current
> logError: anException.
> Or something like that in order to know what object crash in my
application.

In that case, I don't understand why Dolphin.errors isn't meeting your
needs.  Since you mention walkbacks, it sounds like you are trying to do
this in the development environment, which should be logging errors for you
already.

Am I missing something?

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Log Error question

Don Rylander
In reply to this post by Bruno Brasesco
Bruno,
"Bruno Brasesco" <[hidden email]> wrote in message
news:982u3j$2bcf$[hidden email]...
[...]
> I want to catch anException to use: DevelopmentSessionManager current
> logError: anException.
> Or something like that in order to know what object crash in my application.
[...]

Are you referring to DevelopmentSessionManager in an application instead of
SessionManager?  That might be a problem.

Don