else if(mode=="none")
return DYNAMIC;
else
- throw Exception("Unknown library mode");
+ throw runtime_error("unknown library mode");
}
string SourcePackage::expand_string(const string &str) const
while((dollar = result.find('$'))!=string::npos)
{
if(n>1000)
- throw Exception("Too much variable expansions");
+ throw bad_expansion("nested too deep");
string::size_type end;
string var;
{
end = result.find('}', dollar+2);
if(end==string::npos)
- throw Exception("Unterminated variable reference");
+ throw bad_expansion("unterminated variable reference");
var = result.substr(dollar+2, end-dollar-2);
++end;
}