Added error handling
This commit is contained in:
@ -33,7 +33,7 @@ namespace fsh {
|
||||
protected:
|
||||
|
||||
std::string replace_all(std::string str,const std::string &what,const std::string &with) {
|
||||
if(what == "") throw std::runtime_error("\"\" cannot be used as what");
|
||||
if(what == "") throw util::CmdError("What cannot be empty string");
|
||||
|
||||
unsigned long long pos = str.find(what);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user