Tonight I entered a clean up phase of a project i'm working on, and ran into something I'm not sure how to answer.
FxCop throws a 'DoNotCatchGeneralExceptionTypes' Non Breaking msg on the try/catch block found in the ObjectDAOBase.MapObject object. I understand why fxcop says what it says, however, i'm not clear on what type of exception could be thrown here, or, if one will even be thrown.
In the testing i've done in trying to force an error, i get compile time errors. If i manually change r.GetOrdinal("Name") to r.GetOrdinal("asdf"), the error it causes is caught by my BLL or UIL and is bubbled up there. However, no exception is thrown in the mapopbject because it did exactly what was expected.
Could the try catches be removed from here? Or is there a specific exception that should be caught here?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tonight I entered a clean up phase of a project i'm working on, and ran into something I'm not sure how to answer.
FxCop throws a 'DoNotCatchGeneralExceptionTypes' Non Breaking msg on the try/catch block found in the ObjectDAOBase.MapObject object. I understand why fxcop says what it says, however, i'm not clear on what type of exception could be thrown here, or, if one will even be thrown.
In the testing i've done in trying to force an error, i get compile time errors. If i manually change r.GetOrdinal("Name") to r.GetOrdinal("asdf"), the error it causes is caught by my BLL or UIL and is bubbled up there. However, no exception is thrown in the mapopbject because it did exactly what was expected.
Could the try catches be removed from here? Or is there a specific exception that should be caught here?