catch error in plugin