]> git.tdb.fi Git - builder.git/blobdiff - source/component.cpp
Miscellaneous minor code cleanups
[builder.git] / source / component.cpp
index cb81f8420429b78bd79b4d3f70c6021db04e4e81..5f6237e743f88f37d4f8929f59794e65e79e1c41 100644 (file)
@@ -101,7 +101,7 @@ void Component::create_targets() const
                {
                        const TargetMap &targets=builder.get_targets();
                        for(TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i)
-                               if(i->second->get_package()==&pkg && !i->second->get_buildable())
+                               if(i->second->get_package()==&pkg && !i->second->is_buildable())
                                        result->add_depend(i->second);
                        files.push_back(pkg.get_source()/"Build");
                }
@@ -235,7 +235,7 @@ void Component::Loader::require(const string &n)
 void Component::Loader::modular()
 {
        if(comp.type!=PROGRAM)
-               throw Msp::Exception("Only programs can be modular");
+               throw Exception("Only programs can be modular");
        comp.modular=true;
 }
 
@@ -245,13 +245,13 @@ void Component::Loader::host(const string &n)
        for(ComponentList::const_iterator i=comps.begin(); i!=comps.end(); ++i)
                if(i->get_name()==n)
                {
-                       if(i->get_type()!=PROGRAM || !i->get_modular())
-                               throw Msp::Exception("Module host must be a modular program");
+                       if(i->get_type()!=PROGRAM || !i->is_modular())
+                               throw Exception("Module host must be a modular program");
                        comp.module_host=&*i;
                        return;
                }
 
-       throw Msp::Exception("Unknown component");
+       throw KeyError("Unknown component", n);
 }
 
 void Component::Loader::install_headers(const string &p)