Add disconnect method and exception class.