Skip to content

Commit

Permalink
Merge pull request #1418 from hannobraun/validate
Browse files Browse the repository at this point in the history
Improve error message
  • Loading branch information
hannobraun authored Dec 5, 2022
2 parents 349dbd8 + 4045242 commit 4e966cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/fj-kernel/src/services/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ pub struct Validation(

impl Drop for Validation {
fn drop(&mut self) {
if !self.0.is_empty() {
println!("Dropping `Validation` with unhandled validation errors:");
let num_errors = self.0.len();
if num_errors > 0 {
println!(
"Dropping `Validation` with {num_errors} unhandled validation \
errors:"
);

for (_, err) in self.0.values() {
println!("{err}");
Expand Down

0 comments on commit 4e966cf

Please sign in to comment.