Skip to content

Commit 631bf68

Browse files
authored
Merge pull request #2349 from davidalber/configurations-failure-message
Modifying failure messages to be consistent with mismatch message
2 parents 2744190 + 873abf0 commit 631bf68

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/system.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -651,14 +651,16 @@ impl ConfigCodeBlock {
651651

652652
if self.config_name.is_none() {
653653
write_message(format!(
654-
"configuration name not found for block beginning at line {}",
654+
"No configuration name for {}:{}",
655+
CONFIGURATIONS_FILE_NAME,
655656
self.code_block_start.unwrap()
656657
));
657658
return false;
658659
}
659660
if self.config_value.is_none() {
660661
write_message(format!(
661-
"configuration value not found for block beginning at line {}",
662+
"No configuration value for {}:{}",
663+
CONFIGURATIONS_FILE_NAME,
662664
self.code_block_start.unwrap()
663665
));
664666
return false;
@@ -669,9 +671,9 @@ impl ConfigCodeBlock {
669671
fn has_parsing_errors(&self, error_summary: Summary) -> bool {
670672
if error_summary.has_parsing_errors() {
671673
write_message(format!(
672-
"\u{261d}\u{1f3fd} Failed to format block starting at Line {} in {}",
673-
self.code_block_start.unwrap(),
674-
CONFIGURATIONS_FILE_NAME
674+
"\u{261d}\u{1f3fd} Cannot format {}:{}",
675+
CONFIGURATIONS_FILE_NAME,
676+
self.code_block_start.unwrap()
675677
));
676678
return true;
677679
}

0 commit comments

Comments
 (0)