Oh right. Well, in that case the answer is simple:
You can't. The whole concept is meaningless. There is no exception system, so you cannot try and catch. Anyway, there would be nothing to catch. You write character 222 to the serial. How can that "fail"?