Replace Base::Exception with appropriate subclass
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user