Use exceptions instead of ctx_debug_call.