move on_raise() func call underneath its definition.