This question already has an answer here:
- Catch System.AssertException 1 answer
I'm looking to see if there is a way to catch an assertion exception in apex and handle it gracefully. For instance, I have some number fields with a default value as 0. However, I'm hoping to use an assertion exception to ensure those values will never be null. I've done some searches so far and one post suggests creating a custom exception to handle this, but 'm not quite sure how this would resolve the issue. Is this even possible?