It appears that there is no such
catch blocks in algorithm2e. Is there a way to add custom blocks for
catch in algorithm2e?
There is a solution in GitHub which shows how this can be done using the algorithmicx/algpseudocode package. I would like to do this in algorithm2e.