Humour aside, I don't think that's a good approach Alan, and here's why --
If we assume we have a drawing that has valid entities in it you'll agree, this should retrieve all the entities correct?
(ssget "x")
Now let's filter it using your code and supply a bogus handle to the affore mentioned code --
(setq ss
(vl-catch-all-apply 'ssdel
(list (handent "BOGUS")
(ssget "x")
)
)
)
Instead of a selection set containing all the entities being assigned to variable ss we get a bound error object. Not so good me thinks.
If you're bent on using vl-catch-all-apply here's an interesting alternate (of many) just for fun --
(vl-catch-all-apply
'(lambda ( )
(setq ss
(ssdel (handent "BOGUS")
(setq ss
(ssget "x")
)
)
)
)
)
If the supplied handle is valid AND the corresponding ename a member of the inner most ss it will be removed and the resulting (slimmed down) selection set assigned to ss, otherwise the original selection set will remain assigned to ss. The entire code snip does return an error object which we have chosen to discard in this case.