Add error exception raising to close_notify