Canister Backtraces

Seconding what Hamish mentioned here, is there a way that canister developers can selectively catch a trap in the canister_on_error Canister Lifecycle Hook and then decide whether or not to write the simple log or log with backtrace to their standard out (or an internal logging library)?

Most of the time a trap doesn’t get triggered by the controller of a canister, so only exposing backtraces if the canister is the controller is a bit limiting.

It would be helpful if the protocol provides this flexibility in accessing back traces through lifecycle hooks or another mechanism.

2 Likes