dotfiles/.config/shell/bin/error

9 lines
159 B
Text
Raw Normal View History

#!/bin/bash
# for sending error messages from functions and whatnot
ERROR_CODE="$?"
>&2 echo "$0: An error occurred on line number ${1}"
return $ERROR_CODE