Added error handling
This commit is contained in:
@ -27,7 +27,7 @@ namespace fsh {
|
||||
}
|
||||
|
||||
Command& get(const std::string n) {
|
||||
if (cmds.find(n) == cmds.end()) { throw std::runtime_error("Command not found " + n); }
|
||||
if (cmds.find(n) == cmds.end()) { throw util::CmdNotFoundError(n); }
|
||||
return *(cmds[n]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user