handle_trap returns values that get manually transferred on trap