<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_layer_by_name(self, name):
 """Return a layer by name :param name: Name of layer. Case-sensitive. :rtype: Layer object if found, otherwise ValueError """

        try:
            return self.layernames[name]
        except KeyError:
            msg = 'Layer "{0}" not found.'
            logger.debug(msg.format(name))
            raise ValueError