Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ic-cdk/src/api/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ unsafe extern "C" fn callback<T: AsRef<[u8]>>(state_ptr: *const RwLock<CallFutur
// borrow_mut() the state as well. So we need to be careful to not double-borrow_mut.
waker.wake()
}
} else {
crate::trap("Call already trapped");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
crate::trap("Call already trapped");
crate::trap("This call has not been awaited, e.g., because a previous callback trapped");

This could be more precise given an offline discussion with @adamspofford-dfinity

}
}

Expand Down