def a_capture_show_configuration_failed(ctx):
    """Capture the show configuration failed result."""
    result = ctx.device.send("show configuration failed")
    ctx.device.last_command_result = result
    index = result.find("SEMANTIC ERRORS")
    ctx.device.chain.connection.emit_message(result, log_level=logging.ERROR)
    if index > 0:
        raise ConfigurationSemanticErrors(result)
    else:
        raise ConfigurationErrors(result)