Petar Spanja, I wrapped it in try catch because for some reason unknown to us (we've dug around this for a while trying to figure it out) it was always throwing the NotFoundException and sometimes it deleted the object anyway, and sometimes it did not (checked though admin interface), and we did not figure out why.
Thus, unbeknownst to us how this was or was not related to the issue itself, we decided to simply mute it in order to bypass something we could not wrap our heads around that resulted in varying outcomes.
Where you say "The cause for stuff not being deleted from index is that cache purge fails with NotFoundException", is that the explanation then as to why the contents are not being removed? So this issue is known to only happen on a master? On a 5.4 it did not happen as QA tested it, neither (as far as I can remember) the NotFoundException.
André Rømcke, I will QA this then for now, and then perhaps when
EZP-24621 is fixed (which seems to cover a more broad scope) the testing procedure will cover this as well.