I have an user control, which contains multiple methods and each of these methods has a try-catch block. I catch only one type of exceptions, for example ArgumentException. Update - I don't catch one exception but multiple exceptions which I defined.
Each of these methods handles the ArgumentException the same way, so I have redundant code.
Can I catch ArgumentException in one place so that all methods in the user control would use it?
Update1: The application is in use in the production and it is used by many people who are not very familliar with computers. Simplified - they have to insert a lot of numbers into the database (with the help of hand-held optical scanner) and of course they make mistakes. There is at least 8 common exceptions (wrong size, wrong type,...) and in my business logic I catch all these exceptions and throw them to GUI. Because the environment, where the application is installed, is very lousy, I play a loud error sound and display the error message.
Because of the business logic, they have several options to insert these numbers, so the same error catching logic is in multiple methods all across the user control.
Update2: actually I'm not catching ArgumentException but my own exceptions, for instance CodeFormatException, CodeDoesntExistException, CodeNotInTheSelectedRollException etc.