All of which only emphasizes that the performance issues which motivated this delete process almost certainly can be addressed by proper updating and tuning so that actual deletion will be unnecessary unless there is a business case for it ... which has not been stated.
If you want to archive the records, then you want to move them, not delete them.
But, think carefully since moving records to an archive table almost inevitably leads to a query across both tables which can be messy compared to a simple query on one table.
BUT! This
The problem is because...
And why not send the error message to a common component, preferably an object, and have that component manage the stream ... or whatever you use. Note that with a common, shared error message component you can choose at any time to change the implementation and you only need to touch one place.
You beat me to it, James! I was just about to point out that biting the bullet and making the transition to OO would make most of these issues go away while providing a cleaner and more well-structured environment.
Some other things you might try
https://x.com/chris4gl
https://www.linkedin.com/in/christopherkelleher/
https://kelleher.social/@Chris
The last one has a post 4 days ago.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.