]> git.tdb.fi Git - builder.git/blobdiff - source/sourcepackage.cpp
It's okay to throw exceptions from Loader functions
[builder.git] / source / sourcepackage.cpp
index 6eaba739586881eac93f183eeb66ad49ce13c00a..5c83fd7ec18607b4e6728a6594bbb040f017d1ee 100644 (file)
@@ -235,7 +235,7 @@ void SourcePackage::Loader::if_feature(const string &cond)
        if(equals!=string::npos)
        {
                if(equals==0)
-                       error("No feature name specified");
+                       throw invalid_argument("SourcePackage::Loader::if_feature");
                bool negate = cond[equals-1]=='!';
                string name = cond.substr(0, equals-negate);
                string value = obj.config.get_option("with_"+name).value;