- My applications uses error reporting to track exceptions.
- My application uses SQL transactions to make sure that operations are completed completely or not at all.
- My application is multi-threaded.
- Exceptions will occur when more than 1 transaction attempts to do the same thing. This is good because only 1 of them should succeed.
- When a collision does occur, an exception is raised and reported.
- Investigating exceptions takes time.
How should my application handle "safe" exceptions like this?
- It may be difficult to differentiate "safe" and "unsafe" exceptions because the exception raised would be from the database module and the message will likely be generic.
- Exceptions caused by "safe" collisions could have different error messages depending on which point in the transaction that the error occurred at.