We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
boot.sh
## Raises an exception that can be caught by catch statement ## @param exception - a string containing the name of the exception function b.raise () { local exception="$1" shift if echo "${FUNCNAME[@]}" | grep -q 'b.try.do'; then local function=$(echo ${FUNCNAME[1]} | sed -e 's/^_\([^.]\+\)\..*/\1/') function=${function}.exception.$(echo $exception | sed -e 's/\([A-Z]\)/_\L\1/g' -e 's/^_//' -e 's/_exception//') echo 'function :' `tput bold`${FUNCNAME[1]}`tput sgr0` echo 'exception:' "$exception" echo -n 'message : ' tput bold tput setb 3 tput setaf 3 $function tput sgr0 b.set "Bang.Exception.Name" "$exception" b.set "Bang.Exception.Msg" "$*" else b.abort "Uncaught exception $exception: $*" fi }
example:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
boot.sh
example:
The text was updated successfully, but these errors were encountered: