From 9a2dcc9dec1289188479c9cab77648287ed372a7 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sun, 24 Jul 2016 13:11:32 +0200 Subject: [PATCH] Add DisplayError for showing errors on screen --- include/functions | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/functions b/include/functions index 5030eb08..9d0526be 100644 --- a/include/functions +++ b/include/functions @@ -38,6 +38,7 @@ # DirectoryExists Check if a directory exists on the disk # DiscoverProfiles Determine available profiles on system # Display Output text to screen with colors and identation +# DisplayError Show an error on screen # DisplayManual Output text to screen without any layout # DisplayToolTip Show a tip for improving usage of the tool # ExitClean Stop the program (cleanly), with exit code 0 @@ -525,6 +526,20 @@ } + ################################################################################ + # Name : DisplayError() + # Description : Show error on screen + # + # Input : $1 = text (string) + # Returns : + ################################################################################ + + DisplayError() { + ${ECHOCMD} "${WARNING}Error${NORMAL}: ${BOLD}$1${NORMAL}" + ${ECHOCMD} "" + } + + ################################################################################ # Name : DisplayManual() # Description : Show text on screen, without any markup