Skip to main content
4 events
when toggle format what by license comment
Jul 8, 2023 at 12:41 comment added gnasher729 It looks that these cases are not exceptions, but regular behaviour.
Jul 8, 2023 at 9:29 comment added Ewan Erm, I would still have the exceptions at some level. You just need to separate out the code enough so you can see where it is critical. presumably there is a point where you don't want to update if its missing a required field or something and if you somehow have got to that point in the code without the validation being hit already, you need to throw an exception.
Jul 8, 2023 at 1:22 comment added Muhammad Dyas Yaskur Exceptions are useful when the validation is critical. However, if the validation is not crucial and our main objective is to log missing data/records for future filling, we can simplify the code and refrain from using exceptions. This validation requirement is imposed by the third-party integration, and our priority is to ensure our system remains send the records, even if the records may not be valid within the integration. This situation could be attributed to a flawed business flow. But your suggestion to create an IsValid function also sounds interesting. I will try to do that.
Jul 7, 2023 at 22:22 history answered Ewan CC BY-SA 4.0