Skip to content

Commit

Permalink
Improve unimplemented message (yewstack#716)
Browse files Browse the repository at this point in the history
* Improve unimplemented message

When calling Bridged::bridge, it is possible to get a confusing
unimplemented error. This PR adds some explanation and clarity around
the error.

* Update link to point to latest

* cargo fmt
  • Loading branch information
lily-mara authored and llebout committed Jan 20, 2020
1 parent f49b8f3 commit 18d297b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ where
pub trait Discoverer {
/// Spawns an agent and returns `Bridge` implementation.
fn spawn_or_join<AGN: Agent>(_callback: Option<Callback<AGN::Output>>) -> Box<dyn Bridge<AGN>> {
unimplemented!();
unimplemented!(
"The Reach type that you tried to use with this Agent does not have
Discoverer properly implemented for it yet. Please see
https://docs.rs/yew/latest/yew/agent/ for other Reach options."
);
}
}

Expand Down

0 comments on commit 18d297b

Please sign in to comment.