niieani / bash-oo-framework

Bash Infinity is a modern standard library / framework / boilerplate for Bash
https://github.com/niieani/bash-oo-framework/discussions
MIT License
5.57k stars 247 forks source link

util/exception.sh shows stack trace as expected but don't exit on Ctrl+C #81

Open vboufleur opened 5 years ago

vboufleur commented 5 years ago

Hi all!

As the title says, util/exception.sh shows stack trace as expected but don't exit on Ctrl+C.

The script just keeps running, just as if I have pressed Enter.

Is this a bug? A incorrect implementation of my part?

vboufleur commented 5 years ago

Is there a way for me to configure util/exception.sh to always exit if a error happens? This would solve my current issue.

niieani commented 5 years ago

Hi @vboufleur, I think I stumbled upon this issue too - I think it's a bug.

As to your second question, I think there's a way. Change this line:

https://github.com/niieani/bash-oo-framework/blob/0276ffad26cabd5ce29f18b4ca87fbc01bc630ab/lib/util/exception.sh#L233

to exit 0 or exit 1.