Skip to content

Commit

Permalink
Improve unimplemented message (#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 jstarry committed Nov 11, 2019
1 parent c7cc4c2 commit 98ebc65
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 98ebc65

Please sign in to comment.