473,386 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Localizing text in an exception.

I am running the code for a code assembly through FXCop here and it seems to
be throwing a fit each time I pass in some descriptive text into the
constructor for various exceptions I am throwing.

FXCop says that I should be grabbing the text from a string resource so that
it can be localized based on the current culture info.

If this was text that was going to be displayed in a GUI that might be used
in a different country I might be worried about it but this is just
exception text most likely to only be seen by a developer.

Any opinions from the group on this one? Should I really care in this case
and take the time localize my exception strings into other languages?
Jul 21 '05 #1
2 1621
> Any opinions from the group on this one? Should I really care in this case
and take the time localize my exception strings into other languages?

Are you 100% sure no user will see it?
One option: use numbers. The message can be "Fatal exception 1234"
Just a sentence to localize, easy to report and find if a user will
ever see it.

--
Mihai
-------------------------
Replace _year_ with _ to get the real email
Jul 21 '05 #2
It really depends on the app you are developing. If it's for in-house use,
or if you are absolutely, positively sure it will always be run in an
English-only culture then ignore FxCop. Otherwise, I'd at least get familiar
with using string resources, and ideally you would use resources to prepare
yourself for multiple cultures and for running with satellite assemblies.

One thing to keep in mind...even though you think the message will only be
seen by a developer the odds are high that it will be seen by everyone who
runs the product.

"Ray Cassick (Home)" <rc************@enterprocity.com> wrote in message
news:OZ**************@TK2MSFTNGP11.phx.gbl...
I am running the code for a code assembly through FXCop here and it seems to be throwing a fit each time I pass in some descriptive text into the
constructor for various exceptions I am throwing.

FXCop says that I should be grabbing the text from a string resource so that it can be localized based on the current culture info.

If this was text that was going to be displayed in a GUI that might be used in a different country I might be worried about it but this is just
exception text most likely to only be seen by a developer.

Any opinions from the group on this one? Should I really care in this case
and take the time localize my exception strings into other languages?

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Prince | last post by:
Hai all, I got this exception in my application and that occurs in the follwing line.. Trace.WriteLine("Text"); {@"Exception in configuration section handler (D:\Program...
3
by: Trapulo | last post by:
I've a datarepeater that loads custom external templates with loadtemplate and bind data to them. All ok. Now I need to localize some text labels, but I don't know how can I change this data. If I...
8
by: Jonah Olsson | last post by:
Hi guys, For my VB.NET application, I created an ErrorHandler class that should save all available information about the last error occurred. I use Server.GetLastError for this. The problem is...
24
by: Nak | last post by:
Hi there, I have some inherited forms that I wish to make "localizable", unfortunately none of the items I wish to be "localizable" are actually being "localized". For example, I have a few of...
2
by: Ray Cassick \(Home\) | last post by:
I am running the code for a code assembly through FXCop here and it seems to be throwing a fit each time I pass in some descriptive text into the constructor for various exceptions I am throwing. ...
5
by: Alan Silver | last post by:
Hello, I have a page that is supposed to do some checking, and if OK, set a session variable before redirecting to another page. The following code is a simplified version, I have hard-coded the...
3
by: WT | last post by:
Hello, Using english version of vs 2005 to develop, my setup dialogs are all displayed in english, is there some way to have it displayed according the current culture using resources as we do for...
14
by: jehugaleahsa | last post by:
Hello: As an avid reader of C++ books, I know a lot of programmers out there are confronted with the challenge of exception safety. For those who don't know what it is, it is writing code in...
0
by: cmdolcet69 | last post by:
I have an issue with localizing forms, I added a button to my form and then set my form to localizable property = true. changed my language from default to Spanish and saved. I built the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.