diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-09-19 16:47:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-09-19 16:47:07 +0200 |
commit | b7335b8c1425138601698f2deac8e471b371cbcc (patch) | |
tree | 44b882d839540d14bfc7f754aca8344301212342 /odb/validator.cxx | |
parent | 8fc4fda0ce88fccbe40c36be3925237a4bca36d9 (diff) |
Throw exception instead of returning false to indicate validation failure
This is consistent with what's done in processor and generator.
Diffstat (limited to 'odb/validator.cxx')
-rw-r--r-- | odb/validator.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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 (); } |