Exception Handling architecture/framework?
-
Can anybody give me link or suggestions on implementing good exception handling mechanism in the C# project. Not just try...Catch block but beyond that. I have something in mind, 1. Create something like Error Dictionary (resx file) with user-defined Error Codes, Description and build my own error information with user-defined exception class. 2. This class may accept error code or something for generating good exception object, which can be thrown to the consumer. 3. Exception Consumer will then use this object and pass it to Some class, which eventually will display Vista Type task dialog where atleast Title, Main Instruction and Description of the errors will be shown. Any Inputs are very much appreciated. Thanks
-
Can anybody give me link or suggestions on implementing good exception handling mechanism in the C# project. Not just try...Catch block but beyond that. I have something in mind, 1. Create something like Error Dictionary (resx file) with user-defined Error Codes, Description and build my own error information with user-defined exception class. 2. This class may accept error code or something for generating good exception object, which can be thrown to the consumer. 3. Exception Consumer will then use this object and pass it to Some class, which eventually will display Vista Type task dialog where atleast Title, Main Instruction and Description of the errors will be shown. Any Inputs are very much appreciated. Thanks
Why have a method return an error code which you pass to an error code processing method when you can just throw the appropriate exception when it occurs. Your stack trace looks right that way.
-
Why have a method return an error code which you pass to an error code processing method when you can just throw the appropriate exception when it occurs. Your stack trace looks right that way.
-
Why have a method return an error code which you pass to an error code processing method when you can just throw the appropriate exception when it occurs. Your stack trace looks right that way.