def compute_exception_message(default_message, extra_message=None):
    """Returns an error message with an extra error message if provided.

    Otherwise returns the default error message.
    """
    message = default_message
    if extra_message:
        message = '{0} -- {1}'.format(default_message, extra_message)
    return message
