Just change the error message in the select boundary tool to emphasize it's probably not the user's fault

This commit is contained in:
Dustin Carlino 2022-03-21 12:28:37 +00:00
parent d1f6350b89
commit 1661957511

View File

@ -195,10 +195,7 @@ impl Partitioning {
if new_neighborhood_blocks.len() != 1 { if new_neighborhood_blocks.len() != 1 {
// This happens when a hole would be created by adding this block. There are probably // This happens when a hole would be created by adding this block. There are probably
// some smaller blocks nearby to add first. // some smaller blocks nearby to add first.
bail!( bail!("Couldn't add block -- you may need to add an intermediate block first to avoid a hole, or there's a bug you can't workaround yet");
"You must first add intermediate blocks to avoid splitting this neighborhood into {} pieces",
new_neighborhood_blocks.len()
);
} }
let new_neighborhood_block = new_neighborhood_blocks.pop().unwrap(); let new_neighborhood_block = new_neighborhood_blocks.pop().unwrap();