From b7335b8c1425138601698f2deac8e471b371cbcc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 19 Sep 2011 16:47:07 +0200 Subject: Throw exception instead of returning false to indicate validation failure This is consistent with what's done in processor and generator. --- odb/validator.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'odb/validator.cxx') diff --git a/odb/validator.cxx b/odb/validator.cxx index 90e6b7e..c12bff0 100644 --- a/odb/validator.cxx +++ b/odb/validator.cxx @@ -629,7 +629,7 @@ namespace }; } -bool validator:: +void validator:: validate (options const& ops, semantics::unit& u, semantics::path const&, @@ -680,5 +680,6 @@ validate (options const& ops, unit.dispatch (u); } - return valid; + if (!valid) + throw failed (); } -- cgit v1.1