bash-oo-framework icon indicating copy to clipboard operation
bash-oo-framework copied to clipboard

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

Open vboufleur opened this issue 6 years ago • 2 comments

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 avatar Mar 07 '19 21:03 vboufleur

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

vboufleur avatar Mar 08 '19 12:03 vboufleur

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.

niieani avatar Mar 15 '19 20:03 niieani