mirror of
https://github.com/holub/mame
synced 2025-07-10 12:15:31 +03:00
Actually return an error when the validity check fails
This commit is contained in:
parent
0e8d3e4bb3
commit
4e50f95e62
@ -1550,7 +1550,9 @@ void cli_frontend::execute_commands(const char *exename)
|
||||
if (strcmp(m_options.command(), CLICOMMAND_VALIDATE) == 0)
|
||||
{
|
||||
validity_checker valid(m_options);
|
||||
valid.check_all();
|
||||
bool result = valid.check_all();
|
||||
if (!result)
|
||||
throw emu_fatalerror(MAMERR_FAILED_VALIDITY, "Validity check failed!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ void validity_checker::check_shared_source(const game_driver &driver)
|
||||
// check_all - check all drivers
|
||||
//-------------------------------------------------
|
||||
|
||||
void validity_checker::check_all()
|
||||
bool validity_checker::check_all()
|
||||
{
|
||||
// start by checking core stuff
|
||||
validate_begin();
|
||||
@ -218,6 +218,8 @@ void validity_checker::check_all()
|
||||
|
||||
// cleanup
|
||||
validate_end();
|
||||
|
||||
return !(m_errors > 0 || m_warnings > 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
// operations
|
||||
void check_driver(const game_driver &driver);
|
||||
void check_shared_source(const game_driver &driver);
|
||||
void check_all();
|
||||
bool check_all();
|
||||
|
||||
// helpers for devices
|
||||
void validate_tag(const char *tag);
|
||||
|
Loading…
Reference in New Issue
Block a user