Closed iptoux closed 1 year ago
UPDATE
Mostly all is done now, only the output of the source code is missing. I had recoded a big part, but now it is all cleaner now, i split a big function an changed some behavior and handling.
Commits: https://github.com/iptoux/bash_error_lib/compare/main...7-bug-external-errors
error_out_msg() {
local prfx cli_out
prfx=">> "
cli_out="\n------------------------------------------------\n"
cli_out+="${prfx}ERROR (${ECONT["code"]}) - ${ECONT["type"]}\n\n"
cli_out+="${prfx}MSG:${ECONT["msg"]}"
cli_out+="${prfx}CALL/CMD/ARG:${ECONT["call"]}\n\n"
cli_out+="${prfx}CAUSE BY: ${ECONT["cause"]} IN: ${ECONT["source"]} ON LINE: ${ECONT["line"]}\n"
cli_out+="${prfx}FULLSTACK:"
echo -e "${cli_out}"
}
iptoux@2040:~/gits/bash_error_lib$ ./test.sh
------------------------------------------------
>> ERROR (127) - Inline command/func not found.
>> MSG: command not found
>> CALL/CMD/ARG: huhu
>> CAUSE BY: Script IN: ./test.sh ON LINE: 256
>> FULLSTACK:
main @ ./test.sh:256
Jumping to cleanUp!
iptoux@2040:~/gits/bash_error_lib$
Hey,
i recently noticed an major bug that prevents to catch external errors. I had to do some heavy changes to the code. An update to repo will be come soon. And yes you are right, an stack-trace also come to library!