implemented a catch operator