From: Mikko Rasa Date: Fri, 18 Nov 2016 20:29:49 +0000 (+0200) Subject: Check for some errors in SourceGenerator X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5033a9de732963dfcadc42ad381df00b69cf624d;p=builder.git Check for some errors in SourceGenerator --- diff --git a/source/sourcegenerator.cpp b/source/sourcegenerator.cpp index 9acd696..f00b26b 100644 --- a/source/sourcegenerator.cpp +++ b/source/sourcegenerator.cpp @@ -24,6 +24,8 @@ Target *SourceGenerator::create_target(const list &sources, const stri { if(sources.size()!=1) throw invalid_argument("SourceGenerator::create_target"); + if(out_suffixes.empty()) + throw logic_error("No output suffixes"); TemplateFile &tmpl = dynamic_cast(*sources.front()); const Component *comp = tmpl.get_component(); @@ -45,6 +47,8 @@ Target *SourceGenerator::create_target(const list &sources, const stri else primary = target; } + else + throw runtime_error("No tool found for suffix "+*i); } return primary;