Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Display Exception Stack Trace

129 views
Skip to first unread message

Bruno Ceysens

unread,
Jan 19, 2004, 10:32:57 AM1/19/04
to
Hello,

I'm using the StackTrace class in order to display the stack trace when an
exception occurs. I also display the parameter name and type of each method
called:

Begin Stack Trace:
DoubleType>>#Parse
Value As String
NumberFormat As NumberFormatInfo
IntegerType>>#FromString
Value As String
UIMarqueuseAilApplication>>#get_WritePool
UIMarqueuseAilApplication>>#RegisterCustomPools
Application>>#RegisterPools
End Stack Trace:

I'm missing the value of the method parameters. Does someone know how to get
them?

Thanks,

Bruno.


Gabriele G. Ponti

unread,
Jan 19, 2004, 11:32:55 AM1/19/04
to
There is no way to retrieve the value of the parameters.


Bruno Ceysens

unread,
Jan 21, 2004, 6:39:26 AM1/21/04
to
I would be great to have that :(((

"Gabriele G. Ponti" <ggponti.at.hotmail.com> wrote in message
news:utaannq3...@TK2MSFTNGP10.phx.gbl...

Gabriele G. Ponti

unread,
Jan 21, 2004, 7:57:12 AM1/21/04
to
Yep


Jonathan Keljo [MS]

unread,
Jan 30, 2004, 3:15:50 PM1/30/04
to
Unfortunately, the only easy way to get argument information from a
callstack today is with a debugger. If you're trying to do this as part of
error logging in an application and you plan to send the error log back to
your support department, we're hoping to have you use minidumps for that
purpose in the future. (Today, using a minidump with managed code is a
little problematic as it does not include enough information to even get a
stack trace by default. A minidump with heap is better, but not so "mini"
if you know what I mean.)

A purist would say that allowing people to write code that can get
arguments from functions elsewhere on the callstack would encourage them to
break encapsulation and create code that's very fragile in the face of
change. (Your scenario does not have this particular problem, but I've
heard other requests for this feature that would. Anyway most of those
requests can be solved in other ways, like using thread stores.) However,
more importantly there would be security implications of this--applications
that allow plugins would be at risk of those plugins scraping the stack for
sensitive information. We could certainly mark the function as requiring
full-trust, but that would make it unusable for pretty much every scenario
I've heard of.

Jonathan

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Bruno Ceysens" <bruno....@attglobal.netXXX>
| Newsgroups: microsoft.public.dotnet.framework.clr
| Subject: Display Exception Stack Trace
| Date: Mon, 19 Jan 2004 16:32:57 +0100
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Lines: 25
| Message-ID: <400bf8ac$0$325$ba62...@news.skynet.be>
| Organization: -= Belgacom Usenet Service =-
| NNTP-Posting-Host: 81.240.242.77
| X-Trace: 1074526380 reader1.news.skynet.be 325 81.240.242.77:1848
| X-Complaints-To: usenet...@skynet.be
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!skynet.be!skynet.be!louie!tjb!not-for-mail
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.clr:9255
| X-Tomcat-NG: microsoft.public.dotnet.framework.clr

0 new messages