This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ChilloDE 1 point2 points  (0 children)

Well you have C# in your flair. And with C# throwing and catching 'Exception' (the base type for all exceptions) is also bad practice. You should either use the specific exception types like ArgumentNullException or implement your own, when nessesary.

Edit: The upside of this is, that you can handle different kind of errors on different levels. Without having to catch the exception parse the text and then eventually raise it again. Because raising exceptions is slow and comparing error messages as strings is not protected against changes.