Catch tf exception

catch tf2 exception and all exception