diff options
author | 2017-09-04 12:18:49 -0400 | |
---|---|---|
committer | 2017-09-04 12:18:49 -0400 | |
commit | e90268f8c432f32ff1b38c56ec0d1b43d125ee93 (patch) | |
tree | 9059beb531aa9ac64b35e6a4e8c7ba32efcbf42d | |
parent | 4f56d21643a366dbd6840f5315266414e222809d (diff) | |
parent | c4352ecc8a9061ee87911bac1f1cd31f601bd622 (diff) |
Merge pull request #2625 from npwoods/catch_no_validation_matches
-validate will now report an error if no matches occur
-rw-r--r-- | src/emu/validity.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index cc7007e77cc..7e8a88b1442 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -218,9 +218,15 @@ bool validity_checker::check_all_matching(const char *string) // then iterate over all drivers and check them m_drivlist.reset(); + bool validated_any = false; while (m_drivlist.next()) + { if (m_drivlist.matches(string, m_drivlist.driver().name)) + { validate_one(m_drivlist.driver()); + validated_any = true; + } + } // validate devices if (!string) @@ -229,6 +235,10 @@ bool validity_checker::check_all_matching(const char *string) // cleanup validate_end(); + // if we failed to match anything, it + if (string && !validated_any) + throw emu_fatalerror(EMU_ERR_FAILED_VALIDITY, "\"%s\" failed to match any drivers\n", string); + return !(m_errors > 0 || m_warnings > 0); } |