Dump Report Question

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

Dump Report Question

Bruno Brasesco
Hi,

I want to replace some text when in the dump report (app.ERRORS) when an
error occurs (working at RunTime).

I want to replace some parameters (strings) in the stack report (that are
important to my application) with  '[Replaced for Some Reason]'.

How i can do that ?
(i can not find the method to modify the stack)

Regards Bruno

PS:
Example:

{07470628: cf 074705F5, sp 07470638, bp 0747060C, ip e,
EncriptadorDeArchivo>>desencriptarArchivo:en:clave:como:}
receiver: a EncriptadorDeArchivo
arg[0]: 'D:\Documents\Empresas Certificadas en Calidad ##1.xls'
arg[1]: 'String Argument_1'
arg[2]: 'Secret Code: xg23'
arg[3]: 'String Argument_3'

I want to replace 'Secret Code: xg23' with: 'Replaced for some reason'.

{07470628: cf 074705F5, sp 07470638, bp 0747060C, ip e,
EncriptadorDeArchivo>>desencriptarArchivo:en:clave:como:}
receiver: a EncriptadorDeArchivo
arg[0]:  'D:\Documents\Empresas Certificadas en Calidad ##1.xls'
arg[1]: 'String Argument_1'
arg[2]: 'Replaced for some reason'
arg[3]: 'String Argument_3'


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003


Reply | Threaded
Open this post in threaded view
|

Re: Dump Report Question

Blair McGlashan-2
"Bruno" <[hidden email]> wrote in message
news:bpqsvd$1rdhpj$[hidden email]...

> Hi,
>
> I want to replace some text when in the dump report (app.ERRORS) when an
> error occurs (working at RunTime).
>
> I want to replace some parameters (strings) in the stack report (that are
> important to my application) with  '[Replaced for Some Reason]'.
>
> How i can do that ?
> (i can not find the method to modify the stack)

The dump is produced by explicitly invoking the VM's "crash dump" mechanism,
and its format and content be modified.

I'd suggest you modify your runtime session manager to override #logError:.
The default implementation in SessionManager invokes the VMLibrary dump. You
can suppress this and provide your own mechanism for logging errors.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Dump Report Question

Bruno Brasesco
> The dump is produced by explicitly invoking the VM's "crash dump"
mechanism,
> and its format and content be modified.
>
> I'd suggest you modify your runtime session manager to override
#logError:.
> The default implementation in SessionManager invokes the VMLibrary dump.
You
> can suppress this and provide your own mechanism for logging errors.

I´m trying to do this but i can't modify the contents of the Stack.

logError: anException

VMLibrary default dump: anException description path: nil stackDepth: 0
walkbackDepth: -1.

Here i can only modify the description (replacing anException description
with anything else) but not the Stack content's like parameters since is a
VM call.

I'm right Or  I'm doing something wrong ?

Regards Bruno




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003


Reply | Threaded
Open this post in threaded view
|

Re: Dump Report Question

Christopher J. Demers
In reply to this post by Bruno Brasesco
"Bruno" <[hidden email]> wrote in message
news:bpqsvd$1rdhpj$[hidden email]...
> I want to replace some text when in the dump report (app.ERRORS) when an
> error occurs (working at RunTime).
>
> I want to replace some parameters (strings) in the stack report (that are
> important to my application) with  '[Replaced for Some Reason]'.
...

Here is an idea, I am not totally sure it would work, but some quick
experiments I did look encouraging.  Just make a subclass of String, called
HiddenString for example.  I actually overrode printOn: because I figured
the crash dump was using that, but it seems not to use it.  However it is
displayed as 'a HiddenString'.  It looks like instances of String have their
contents displayed, but instanced of subclasses do not.  In a test crash
dump I made one HiddenString, and another String, here is an excerpt of the
results:
========
 receiver: nil
 temp[0]: a HiddenString
 temp[1]: 'I am not hidden'
========

When I pass the HiddenString to a Prompter it displays properly.  I am not
sure if external calls will work properly, but it may be worth a try.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Dump Report Question

Blair McGlashan
In reply to this post by Bruno Brasesco
"Bruno" <[hidden email]> wrote in message
news:bq0db0$1tbbhj$[hidden email]...

> > The dump is produced by explicitly invoking the VM's "crash dump"
> mechanism,
> > and its format and content be modified.
> >
> > I'd suggest you modify your runtime session manager to override
> #logError:.
> > The default implementation in SessionManager invokes the VMLibrary dump.
> You
> > can suppress this and provide your own mechanism for logging errors.
>
> I´m trying to do this but i can't modify the contents of the Stack.
>
> logError: anException
>
> VMLibrary default dump: anException description path: nil stackDepth: 0
> walkbackDepth: -1.
>
> Here i can only modify the description (replacing anException description
> with anything else) but not the Stack content's like parameters since is a
> VM call.
>
> I'm right Or  I'm doing something wrong ?

When I stated that you need to "...suppress [the call to VMLibrary dump] and
provide your own mechanism..." I meant that you will have to provide your
own complete dump implementation, and _not_ call VMLibrary>>dump:etc. You
can use DevelopmentSessionManager>>logError: as a guide to help you do this.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: Dump Report Question

Bruno Brasesco
Ok.

Thanks very much.

Regards
Bruno


"Blair McGlashan" <[hidden email]> escribió en el mensaje
news:bq203n$1tcjm1$[hidden email]...
> "Bruno" <[hidden email]> wrote in message
> news:bq0db0$1tbbhj$[hidden email]...
> > > The dump is produced by explicitly invoking the VM's "crash dump"
> > mechanism,
> > > and its format and content be modified.
> > >
> > > I'd suggest you modify your runtime session manager to override
> > #logError:.
> > > The default implementation in SessionManager invokes the VMLibrary
dump.

> > You
> > > can suppress this and provide your own mechanism for logging errors.
> >
> > I´m trying to do this but i can't modify the contents of the Stack.
> >
> > logError: anException
> >
> > VMLibrary default dump: anException description path: nil stackDepth: 0
> > walkbackDepth: -1.
> >
> > Here i can only modify the description (replacing anException
description
> > with anything else) but not the Stack content's like parameters since is
a
> > VM call.
> >
> > I'm right Or  I'm doing something wrong ?
>
> When I stated that you need to "...suppress [the call to VMLibrary dump]
and
> provide your own mechanism..." I meant that you will have to provide your
> own complete dump implementation, and _not_ call VMLibrary>>dump:etc. You
> can use DevelopmentSessionManager>>logError: as a guide to help you do
this.
>
> Regards
>
> Blair
>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003