core: fix missing 'catch' code