From e987ce16525137efb50ce02a6552384851b49f88 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Sat, 5 Feb 2022 12:32:31 +1100 Subject: Standardise error output. (#16220) --- builddefs/bootloader.mk | 2 +- builddefs/message.mk | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'builddefs') diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk index 56ef7ff5d8..226213297e 100644 --- a/builddefs/bootloader.mk +++ b/builddefs/bootloader.mk @@ -204,5 +204,5 @@ ifeq ($(strip $(BOOTLOADER)), md-boot) endif ifeq ($(strip $(BOOTLOADER_TYPE)),) - $(error No bootloader specified. Please set an appropriate 'BOOTLOADER' in your keyboard's 'rules.mk' file) + $(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,No bootloader specified. Please set an appropriate 'BOOTLOADER' in your keyboard's 'rules.mk' file.) endif diff --git a/builddefs/message.mk b/builddefs/message.mk index 1187491452..d441f560be 100644 --- a/builddefs/message.mk +++ b/builddefs/message.mk @@ -101,3 +101,8 @@ MSG_FLASH_ARCH = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's architecture is n MSG_BOOTLOADER_NOT_FOUND = $(ERROR_COLOR)ERROR:$(NO_COLOR) $(MSG_BOOTLOADER_NOT_FOUND_BASE) Trying again in 5s (Ctrl+C to cancel)\n BOOTLOADER_RETRY_TIME ?= 0.5 MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY = $(MSG_BOOTLOADER_NOT_FOUND_BASE) Trying again every $(BOOTLOADER_RETRY_TIME)s (Ctrl+C to cancel) + +define CATASTROPHIC_ERROR + $(shell printf "\n * %-99s $(ERROR_STRING)\n" "$2" >&2) + $(error $1) +endef \ No newline at end of file -- cgit v1.2.3