Skip to content

Commit

Permalink
Add more information to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Mar 21, 2023
1 parent 53bda52 commit 9898612
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion crates/fj-kernel/src/validate/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,22 @@ pub enum ShellValidationError {
#[error(
"Shell contains HalfEdges that are identical but do not coincide\n\
Edge 1: {edge_1:#?}\n\
Edge 2: {edge_2:#?}"
Surface for edge 1: {surface_1:#?}\n\
Edge 2: {edge_2:#?}\n\
Surface for edge 2: {surface_2:#?}"
)]
IdenticalEdgesNotCoincident {
/// The first edge
edge_1: Handle<HalfEdge>,

/// The surface that the first edge is on
surface_1: Handle<Surface>,

/// The second edge
edge_2: Handle<HalfEdge>,

/// The surface that the second edge is on
surface_2: Handle<Surface>,
},
}

Expand Down Expand Up @@ -129,7 +137,9 @@ impl ShellValidationError {
errors.push(
Self::IdenticalEdgesNotCoincident {
edge_1: edge.0.clone(),
surface_1: edge.1.clone(),
edge_2: other_edge.0.clone(),
surface_2: other_edge.1.clone(),
}
.into(),
)
Expand Down

0 comments on commit 9898612

Please sign in to comment.