1
0
Fork 0

Standardise error output. (#16220)

This commit is contained in:
Nick Brassel 2022-02-05 12:32:31 +11:00 committed by GitHub
parent 45406c0ca2
commit e987ce1652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 17 deletions

View file

@ -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

View file

@ -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