HighTechTalks DotNet Forums  

Re: Forcing exception messages to English

Dotnet Internationalization microsoft.public.dotnet.internationalization


Discuss Re: Forcing exception messages to English in the Dotnet Internationalization forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Jan Kucera
 
Posts: n/a

Default Re: Forcing exception messages to English - 09-11-2007 , 05:38 AM






Hello, I don't know the answer for your problem (although interested in it
as well), but

" I cannot even tell what class of
exception it is as the reporting function is not a catch() but a
handler which takes a base Exception parameter"


class Program
{
static void Main(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(CurrentDomain_Unhan dledException);
throw new DivideByZeroException();
}

static void CurrentDomain_UnhandledException(object sender,
UnhandledExceptionEventArgs e)
{
Console.WriteLine(e.ExceptionObject.GetType());
}
}

This writes me out "System.DivideByZeroException", isn't this the class of
exception you are missing?

Jan



<komondorok (AT) gmail (DOT) com> wrote

Quote:
I have a C# application that installs a custom handler for
AppDomain.CurrentDomain.UnhandledException that will grab a stack
trace and the text of the exception. It then launches a separate app
to upload this information through a web form to a bug tracking
system, so that the app developers can track down and fix the issue.

This works great for most users, however some are in non-English
cultures and the exception message is worthless to our (english-only)
developers. Is there a way to have the exceptions put into the
invariant culture so that

.NET Exception: ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆå‚ç …§ãŒã‚ªãƒ–ジェクムˆ
ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã«è¨ *定されていませ㠂“。

instead becomes something that is understandable? At this point such
a bug reporting system becomes basically worthless for users that are
not in English-speaking locales. As far as I can tell, this message
is coming from the .NET framework and is not one we are throwing. The
stack trace tells us which function it was in, but does not give any
more granularity than that. I cannot even tell what class of
exception it is as the reporting function is not a catch() but a
handler which takes a base Exception parameter.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.