All Questions
Tagged with exceptions .net
38 questions
2
votes
2
answers
3k
views
Validations and throwing exceptions in DDD?
I have a question regarding validations and exceptions in DDD.
I have a ValueObject say, PasswordText which takes a string argument in it's constructor. Checks if the string matches the password ...
1
vote
5
answers
2k
views
What is best way to handling exceptions without users see errors for technical supports?
Assuming you have a software which you gave to clients.
Now we all know that exceptions can be saved to files, databases, and so on for tracing errors by technicians. As all engineers know, no Apps ...
32
votes
7
answers
12k
views
How to treat unhandled exceptions? (Terminate the application vs. Keep it alive)
What is best practice when a unhandled exceptions occurs in a desktop application?
I was thinking about to show a message to the user, so that he can contact support. I would recommend to the user to ...
1
vote
2
answers
1k
views
Throw Custom Exception
First, I know - there are a lot of online resources that talk about the topic Exception handling - but yet there is still something that's unclear to me.
Consider having this code in an external ...
1
vote
5
answers
1k
views
Limits of Defensive Programming acknowledging that Exception Handling should be avoided
I've read Defensive Programming vs Exception Handling? and if/else statements or exceptions, but none contain something relevant to what I'm searching for.
Taking into account that exception handling ...
17
votes
3
answers
7k
views
Should I localize exception messages?
It is probably related to "Who should read Exception.Message if at all" and similar questions asked on this site, but I don't see how it is possible to always generate a custom message while avoiding ...
-3
votes
1
answer
82
views
Convention for exception argument order [closed]
Just a quick question about a design pattern for creating custom exceptions. The question is more about the order of parameters. If you can specify more data in the exception, should the parameter for ...
0
votes
1
answer
971
views
Include exceptions in activity diagrams? [closed]
Should I include exceptions, like a TimeOutException or just general Exceptions, to a activity diagram?
For example: A activity diagram describing a client-server connection. Several exceptions can ...
9
votes
3
answers
2k
views
Should I make my own exceptions, or co-opt similar exceptions for slightly non-standard purposes?
This is a general design question, but I'm focusing on C# and .NET because those are the languages I'm working with right now.
Should I create my own, new exception classes, or co-opt existing ...
5
votes
2
answers
892
views
Strategies to analyze collected exceptions
We want to add error feedback to our application. I had a look at existing solutions (e.g. raygun.io), but these work "in the cloud", which is a no-go for us:
most installations of our application are ...
0
votes
1
answer
696
views
proper exception handling (throwing/message) dll libary
I just wrote a dll library using vb.net. while testing, i got an error which i did not initially use a try-catch block. The code is
Try
'The first four bytes are for the Command
...
6
votes
5
answers
6k
views
How to handle exceptions that get absorbed by a 3rd party library?
I'm currently having an issue with a 3rd party control library provider. They have an exception occulting culture that gets in the way of my general fail-fast approach when developing software.
An ...
3
votes
1
answer
1k
views
How to differentiate between exceptions coming from system and business logic?
I would like to differentiate between exceptions coming from business logic like
requested database record does not exist
attempt to store invalid business data (validation failed)
provided CSV file ...
2
votes
1
answer
113
views
Under which circumstances does it make sense to lose track of where an exception was thrown from?
Is there any valid reason why a catch block on a lower layer would throw back an exception caused by a higher, unknown layer using the following syntax:
throw ex;
... rather than:
throw;
... ?
In ...