Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Cloning an Exception (kinda sorta)

By , 9 Apr 2011
Rate this:
Please Sign up or sign in to vote.
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. Smile | :)


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

About the Author

Andrew Rissing
Software Developer (Senior)
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... Pinmembertgrt12-Jul-11 5:46 
GeneralReason for my vote of 5 Exactly my idea. PinmemberJV99994-Jul-11 21:43 
GeneralReason for my vote of 5 It's true. PinmemberOshtri Deka18-Apr-11 1:55 
GeneralYep, maintaining old(ish) code, I can't make big changes and... PinmemberPIEBALDconsult9-Apr-11 14:38 

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

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

| Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 9 Apr 2011
Article Copyright 2011 by Andrew Rissing
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid