473,385 Members | 2,069 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,385 software developers and data experts.

My Exceptional classes

Hihi, i am writing utilities classes using C#. The utilities contain my own
exceptional classes. Until now, my design about the exceptional classes is
that:

I have my expceitonal class and inherit from ApplicationException and i will
assign a message to it when creating the instance for more details to
identify what's the problems are. The message is not hardcoded in program,
the exceptional classes will call and pass MessageKey to a MessageReader
class to get the message from a text file.

In this case, i should collect all the messages in a text file, and i
confuse with that. I think i should seperate the different exception's
message in different file. For example, at least i will have Common
Message(e.g. Out of range) and Applicaiton Message(e.g. field cannot be
empty). And then, when the program create common's exception, the
MessageReader will get message from common file. However, if i use this
method, i will have many message file and it seem difficult to maintain.

So i want to know how to do the exception class in a better way? How the
..NET to do it? Is it same with me? Does my method correct?
Nov 15 '05 #1
0 1119

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

Similar topics

5
by: makuchaku | last post by:
Hi all I'm facing a strange problem in C++ exceptions. If an error occurs in a class, throw() is used. But whenever that happens, the object is destroyed. In a nutshell, accessing the...
0
by: kendf | last post by:
As a beginner, I using .Net SDK v1.1 for command line compilation. I have a problem to compile the source code of MS Exceptional Management Application Block, downloaded from MS official web...
2
by: joye | last post by:
Hello, My question is how to use C# to call the existing libraries containing unmanaged C++ classes directly, but not use C# or managed C++ wrappers unmanaged C++ classes? Does anyone know how...
18
by: Edward Diener | last post by:
Is the packing alignment of __nogc classes stored as part of the assembly ? I think it must as the compiler, when referencing the assembly, could not know how the original data is packed otherwise....
3
by: clintonb | last post by:
Some programmers, and even Microsoft documents, say you should only throw exceptions for exceptional situations. So how are others handling all the other unexceptional errors? How are you...
6
by: ivan.leben | last post by:
I want to write a Mesh class using half-edges. This class uses three other classes: Vertex, HalfEdge and Face. These classes should be linked properly in the process of building up the mesh by...
1
by: psbasha | last post by:
Hi , Whether we have to write the try/catch for each method of the class or it is sufficient to write in the main execution of the functionality call. Is Error Handling and Exceptional...
1
by: Hicham Mouline | last post by:
Hello, I am looking for an example of a constructor, I think, which took the type itself for integral or floating types, and a const-ref for a user-defined non primitive type. I saw this in...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.