Click here to Skip to main content
15,868,141 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

Cloning an Exception (kinda sorta)

Rate me:
Please Sign up or sign in to vote.
5.00/5 (5 votes)
9 Apr 2011CPOL 11.9K   3   4
I would actually go the route getting those developers to follow good practice. As a whole, the field would be better off if developers like that were mentored rather than something like this.So, I would recommend using either of the techniques you put forth originally (using the Data...
I would actually go the route getting those developers to follow good practice. As a whole, the field would be better off if developers like that were mentored rather than something like this.

So, I would recommend using either of the techniques you put forth originally (using the Data property or a specialized exception).

Granted, if you're working in legacy code, it isn't always possible, but it is the ideal. :)

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
Since I've begun my profession as a software developer, I've learned one important fact - change is inevitable. Requirements change, code changes, and life changes.

So..If you're not moving forward, you're moving backwards.

Comments and Discussions

 
GeneralI cannot agree more. Wrap when it makes sense and rethrow w... Pin
tgrt12-Jul-11 5:46
tgrt12-Jul-11 5:46 
GeneralReason for my vote of 5 Exactly my idea. Pin
JV99994-Jul-11 21:43
professionalJV99994-Jul-11 21:43 
GeneralReason for my vote of 5 It's true. Pin
Oshtri Deka18-Apr-11 1:55
professionalOshtri Deka18-Apr-11 1:55 
GeneralYep, maintaining old(ish) code, I can't make big changes and... Pin
PIEBALDconsult9-Apr-11 14:38
mvePIEBALDconsult9-Apr-11 14:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.