<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rc_to_exctype(cls, rc):
 """ Map an error code to an exception :param int rc: The error code received for an operation :return: a subclass of :class:`CouchbaseError` """

        try:
            return _LCB_ERRNO_MAP[rc]
        except KeyError:
            newcls = _mk_lcberr(rc)
            _LCB_ERRNO_MAP[rc] = newcls
            return newcls