Added graceful error handling for the Connector class.