From e078392026588073aabe4f75d68c5b174211898a Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Wed, 26 Aug 2009 02:53:31 -0300 Subject: emits an error message when no type system file is passed to ApiExtractor::run Reviewed by Hugo Parente --- apiextractor.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apiextractor.cpp') 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; } -- cgit v1.2.3