From 784a617802148868fc0c2520c2b58e45883d5ac8 Mon Sep 17 00:00:00 2001 From: belliash Date: Thu, 12 Jan 2012 13:19:53 +0100 Subject: [PATCH] status should be optional --- libraries/common | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libraries/common b/libraries/common index e0e6d9f..76c7b2f 100644 --- a/libraries/common +++ b/libraries/common @@ -47,14 +47,15 @@ function checkVersion() { } #------------------------------------------------------------------------------- -# Outputs formatted error message and aborts script execution with given code -# Parameters: %message% %code% +# Outputs formatted error message and aborts script execution with given status +# Parameters: %message% [%status%] #------------------------------------------------------------------------------- function die() { - notify "${1}" ${2} + local STATUS=${2:-1} + notify "${1}" ${STATUS} printError "${1}" echo -ne "\n" - exit ${2} + exit ${STATUS} } #-------------------------------------------------------------------------------