diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-08-26 02:53:31 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-08-26 13:09:15 -0300 |
commit | e078392026588073aabe4f75d68c5b174211898a (patch) | |
tree | 09e46f1ba167a482de84c0043cc3cdb70e03a198 /apiextractor.cpp | |
parent | 09a312b7788a81e0af59fc090666aea37b71fff7 (diff) |
emits an error message when no type system file is passed to
ApiExtractor::run
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'apiextractor.cpp')
-rw-r--r-- | apiextractor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apiextractor.cpp b/apiextractor.cpp index 97fa2a65d..d257b07f5 100644 --- a/apiextractor.cpp +++ b/apiextractor.cpp @@ -142,8 +142,11 @@ bool ApiExtractor::run() { if (m_builder) return false; - // read typesystem - if (!TypeDatabase::instance()->parseFile(m_typeSystemFileName)) { + + if (m_typeSystemFileName.isEmpty()) { + std::cerr << "You must specify a Type System file." << std::endl; + return false; + } else if (!TypeDatabase::instance()->parseFile(m_typeSystemFileName)) { std::cerr << "Cannot parse file: " << qPrintable(m_typeSystemFileName); return false; } |