add catch exception snippet