Replace Base::Exception with appropriate subclass

This commit is contained in:
wmayer
2018-11-14 17:47:43 +01:00
parent c5a5eb6a83
commit f9e487e4b2
7 changed files with 12 additions and 12 deletions

View File

@@ -155,7 +155,7 @@ void Command::setFromGCode (const std::string& str)
value = "";
mode = "argument";
} else {
throw Base::Exception("Badly formatted GCode command");
throw Base::BadFormatError("Badly formatted GCode command");
}
mode = "argument";
} else if (mode == "none") {
@@ -168,7 +168,7 @@ void Command::setFromGCode (const std::string& str)
key = "";
value = "";
} else {
throw Base::Exception("Badly formatted GCode argument");
throw Base::BadFormatError("Badly formatted GCode argument");
}
} else if (mode == "comment") {
value += str[i];
@@ -198,7 +198,7 @@ void Command::setFromGCode (const std::string& str)
Parameters[key] = val;
}
} else {
throw Base::Exception("Badly formatted GCode argument");
throw Base::BadFormatError("Badly formatted GCode argument");
}
}