mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-05-19 16:58:30 +00:00
respond to jorges reviw– make error messages more useful
This commit is contained in:
parent
71579aaa9f
commit
35a78540c0
|
@ -206,9 +206,9 @@ fn notmain() -> Result<i32, anyhow::Error> {
|
||||||
}
|
}
|
||||||
Err(probe_rs_rtt::Error::ControlBlockNotFound) => {
|
Err(probe_rs_rtt::Error::ControlBlockNotFound) => {
|
||||||
if try_index < NUM_RETRIES {
|
if try_index < NUM_RETRIES {
|
||||||
log::info!("Attaching RTT failed. retrying");
|
log::info!("Could not attach because the target's RTT control block isn't initialized (yet). retrying");
|
||||||
} else {
|
} else {
|
||||||
log::info!("Max number of retries exceeded. Giving up");
|
log::info!("Max number RTT attach of retries exceeded. Did you call dk::init() first thing in your program?");
|
||||||
return Err(anyhow!(probe_rs_rtt::Error::ControlBlockNotFound));
|
return Err(anyhow!(probe_rs_rtt::Error::ControlBlockNotFound));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue