Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2020-04-30 00:01:22 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-04-30 00:01:22 +0300
commit6f912e9ca47930d7b91d504c0e9c8be31251284a (patch)
treecaae3d097ef2b4a0c6053d2ed1a61d64f874d483 /src/ObjectModel
parente96b00a69cfb4f80c78ae3b81659dfde53897602 (diff)
Various changes for 3.01-RC11
Tool change files are now run even if axes have not been homed PanelDue replies are now sent immediately instead of being saved for retrieval by M408 Added aux raw mode On Duet 3, IO_0 is not configured in serial mode until M575 P1 is executed GCodeException class now stores a small string to allow more meaningful error messages
Diffstat (limited to 'src/ObjectModel')
-rw-r--r--src/ObjectModel/ObjectModel.cpp7
-rw-r--r--src/ObjectModel/ObjectModel.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ObjectModel/ObjectModel.cpp b/src/ObjectModel/ObjectModel.cpp
index 0cc8bd3f..0852ec18 100644
--- a/src/ObjectModel/ObjectModel.cpp
+++ b/src/ObjectModel/ObjectModel.cpp
@@ -277,6 +277,11 @@ GCodeException ObjectExplorationContext::ConstructParseException(const char *msg
return GCodeException(line, column, msg);
}
+GCodeException ObjectExplorationContext::ConstructParseException(const char *msg, const char *sparam) const noexcept
+{
+ return GCodeException(line, column, msg, sparam);
+}
+
// Report this object
void ObjectModel::ReportAsJson(OutputBuffer* buf, ObjectExplorationContext& context, uint8_t tableNumber, const char* filter) const
{
@@ -735,7 +740,7 @@ ExpressionValue ObjectModel::GetObjectValue(ObjectExplorationContext& context, c
const ObjectModelTableEntry *const e = FindObjectModelTableEntry(tableNumber, idString);
if (e == nullptr)
{
- throw context.ConstructParseException("unknown value"); // idString will have gone out of scope by the time the exception is caught
+ throw context.ConstructParseException("unknown value '%s'", idString);
}
idString = GetNextElement(idString);
diff --git a/src/ObjectModel/ObjectModel.h b/src/ObjectModel/ObjectModel.h
index 548469a6..f6a3c2be 100644
--- a/src/ObjectModel/ObjectModel.h
+++ b/src/ObjectModel/ObjectModel.h
@@ -183,6 +183,7 @@ public:
bool ShouldIncludeNulls() const noexcept { return includeNulls; }
GCodeException ConstructParseException(const char *msg) const noexcept;
+ GCodeException ConstructParseException(const char *msg, const char *sparam) const noexcept;
private:
static constexpr size_t MaxIndices = 4; // max depth of array nesting