[Mono-devel-list] [PATCH] StackTraces - remove some localization
Kornél Pál
kornelpal at hotmail.com
Sat Jun 11 04:23:37 EDT 2005
> From: "Gonzalo Paniagua Javier"
> Writing to the console can also throw an exception so... should we not
> print the exception? ;-)
I know you are joking, but of course It's no use to print an exception caues
by WriteLine if we want to write it using WriteLine that is known not to
succeed.:))
> So I was 2 hours out and there was a debate on changing the I18N rules?
> Quite some time ago, it was decided to be that way. If we're changing
> that I'd like some debate action here.
I posted the patch to the list to discuss the benefits and drawbacks of this
change.:)
If there is a written document about I18N rules please let me know but of
course if we have good reasons these rules can be changed.:)
Some reasons not to localize stack traces:
- can be used to last chance error reporting
- the furrent format of StackFrame.ToString() cannot be transalted for
example to Hungarian because the grammatical characteristics of the language
requires more words in a much different order. And note that in the current
form it cannot be localized because currently words are localized instead of
sentences at least.
- .NET Framework does not localize these stack traces, they can be used as a
standard (that may change at any time of course:) format.
Examle stack traces generated by .NET Framework 1.1 with
Thread.CurrentCulture and Thread.CurrentUICulture set to "hu-HU":
Debug stack trace (and needFileInfo = true):
Exception.ToString():
System.Exception: ex3 ---> System.Exception: ex2 ---> System.Exception: ex1
at StackTraceTest.Form1.Form1_Load(Object sender, EventArgs e) in
c:\stacktracetest\form1.cs:line 98
--- Vége a belső kivételek veremkivonatának ---
at StackTraceTest.Form1.Form1_Load(Object sender, EventArgs e) in
c:\stacktracetest\form1.cs:line 102
--- Vége a belső kivételek veremkivonatának ---
at StackTraceTest.Form1.Form1_Load(Object sender, EventArgs e) in
c:\stacktracetest\form1.cs:line 107
Exception.StackTrace:
at StackTraceTest.Form1.Form1_Load(Object sender, EventArgs e) in
c:\stacktracetest\form1.cs:line 107
StackTrace.ToString():
at StackTraceTest.Form1.Form1_Load(Object, EventArgs)
StackFrame.ToString():
Form1_Load at offset 221 in file:line:column
c:\stacktracetest\form1.cs:107:6
Release stack trace (and needFileInfo = false):
Exception.ToString():
System.Exception: ex3 ---> System.Exception: ex2 ---> System.Exception: ex1
at StackTraceTest.Form1.Form1_Load(Object sender, EventArgs e)
--- Vége a belső kivételek veremkivonatának ---
at StackTraceTest.Form1.Form1_Load(Object sender, EventArgs e)
--- Vége a belső kivételek veremkivonatának ---
at StackTraceTest.Form1.Form1_Load(Object sender, EventArgs e)
Exception.StackTrace:
at StackTraceTest.Form1.Form1_Load(Object sender, EventArgs e)
StackTrace.ToString():
at StackTraceTest.Form1.Form1_Load(Object, EventArgs)
StackFrame.ToString():
Form1_Load at offset 221 in file:line:column <filename unknown>:0:0
Kornél
More information about the Mono-devel-list
mailing list