aboutsummaryrefslogtreecommitdiffstats
path: root/apiextractor.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-08-26 02:53:31 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-08-26 13:09:15 -0300
commite078392026588073aabe4f75d68c5b174211898a (patch)
tree09e46f1ba167a482de84c0043cc3cdb70e03a198 /apiextractor.cpp
parent09a312b7788a81e0af59fc090666aea37b71fff7 (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.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/apiextractor.cpp b/apiextractor.cpp
index 97fa2a65..d257b07f 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;
}