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>2021-05-26 11:38:18 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-05-26 11:38:18 +0300
commit0ccbadc71be4ea7812236f099ea90180a0df424a (patch)
tree69748869623762b287bb65234f422379947f78e5
parent2d6866c9de072bf20e790991d93e4f3cae6d19bb (diff)
Corrected some exception specifications (thanks Andy)
-rw-r--r--src/Endstops/EndstopsManager.cpp2
-rw-r--r--src/Endstops/EndstopsManager.h2
-rw-r--r--src/Fans/Fan.cpp2
-rw-r--r--src/Fans/Fan.h2
-rw-r--r--src/GCodes/GCodes.cpp6
-rw-r--r--src/GCodes/GCodes.h28
-rw-r--r--src/Hardware/IoPorts.h2
-rw-r--r--src/Heating/Heat.cpp4
-rw-r--r--src/Heating/Heat.h4
-rw-r--r--src/Heating/Sensors/SensorWithPort.h2
-rw-r--r--src/Heating/Sensors/SpiTemperatureSensor.h2
-rw-r--r--src/Heating/Sensors/TemperatureSensor.h2
12 files changed, 29 insertions, 29 deletions
diff --git a/src/Endstops/EndstopsManager.cpp b/src/Endstops/EndstopsManager.cpp
index dfe28b52..6cb83821 100644
--- a/src/Endstops/EndstopsManager.cpp
+++ b/src/Endstops/EndstopsManager.cpp
@@ -314,7 +314,7 @@ EndstopHitDetails EndstopsManager::CheckEndstops() noexcept
}
// Configure the endstops in response to M574
-GCodeResult EndstopsManager::HandleM574(GCodeBuffer& gb, const StringRef& reply, OutputBuffer*& outbuf) noexcept
+GCodeResult EndstopsManager::HandleM574(GCodeBuffer& gb, const StringRef& reply, OutputBuffer*& outbuf) THROWS(GCodeException)
{
// First count how many axes we are configuring, and lock movement if necessary
unsigned int axesSeen = 0;
diff --git a/src/Endstops/EndstopsManager.h b/src/Endstops/EndstopsManager.h
index fe5c441f..0fbe43de 100644
--- a/src/Endstops/EndstopsManager.h
+++ b/src/Endstops/EndstopsManager.h
@@ -42,7 +42,7 @@ public:
EndstopHitDetails CheckEndstops() noexcept;
// Configure the endstops in response to M574
- GCodeResult HandleM574(GCodeBuffer& gb, const StringRef& reply, OutputBuffer*& outbuf) noexcept;
+ GCodeResult HandleM574(GCodeBuffer& gb, const StringRef& reply, OutputBuffer*& outbuf) THROWS(GCodeException);
EndStopPosition GetEndStopPosition(size_t axis) const pre(axis < MaxAxes) noexcept;
bool HomingZWithProbe() const noexcept;
diff --git a/src/Fans/Fan.cpp b/src/Fans/Fan.cpp
index 0da37b0f..97f7c501 100644
--- a/src/Fans/Fan.cpp
+++ b/src/Fans/Fan.cpp
@@ -63,7 +63,7 @@ Fan::Fan(unsigned int fanNum) noexcept
// Exceptions:
// 1. Only process the S parameter if other values were processed.
// 2. Don't process the R parameter, but if it is present don't print the existing configuration.
-bool Fan::Configure(unsigned int mcode, size_t fanNum, GCodeBuffer& gb, const StringRef& reply, bool& error)
+bool Fan::Configure(unsigned int mcode, size_t fanNum, GCodeBuffer& gb, const StringRef& reply, bool& error) THROWS(GCodeException)
{
bool seen = false;
if (mcode == 106)
diff --git a/src/Fans/Fan.h b/src/Fans/Fan.h
index 87bcca1b..691166da 100644
--- a/src/Fans/Fan.h
+++ b/src/Fans/Fan.h
@@ -40,7 +40,7 @@ public:
// then search for parameters used to configure the fan. If any are found, perform appropriate actions and return true.
// If errors were discovered while processing parameters, put an appropriate error message in 'reply' and set 'error' to true.
// If no relevant parameters are found, print the existing ones to 'reply' and return false.
- bool Configure(unsigned int mcode, size_t fanNum, GCodeBuffer& gb, const StringRef& reply, bool& error);
+ bool Configure(unsigned int mcode, size_t fanNum, GCodeBuffer& gb, const StringRef& reply, bool& error) THROWS(GCodeException);
float GetConfiguredPwm() const noexcept { return val; } // returns the configured PWM. Actual PWM may be different, e.g. due to blipping or for thermostatic fans.
diff --git a/src/GCodes/GCodes.cpp b/src/GCodes/GCodes.cpp
index ef4fa6be..877701b2 100644
--- a/src/GCodes/GCodes.cpp
+++ b/src/GCodes/GCodes.cpp
@@ -3968,7 +3968,7 @@ GCodeResult GCodes::RetractFilament(GCodeBuffer& gb, bool retract)
}
// Load the specified filament into a tool
-GCodeResult GCodes::LoadFilament(GCodeBuffer& gb, const StringRef& reply)
+GCodeResult GCodes::LoadFilament(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException)
{
Tool * const tool = reprap.GetCurrentTool();
if (tool == nullptr)
@@ -4031,7 +4031,7 @@ GCodeResult GCodes::LoadFilament(GCodeBuffer& gb, const StringRef& reply)
}
// Unload the current filament from a tool
-GCodeResult GCodes::UnloadFilament(GCodeBuffer& gb, const StringRef& reply)
+GCodeResult GCodes::UnloadFilament(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException)
{
Tool * const tool = reprap.GetCurrentTool();
if (tool == nullptr)
@@ -4617,7 +4617,7 @@ void GCodes::GenerateTemperatureReport(const StringRef& reply) const noexcept
// Check whether we need to report temperatures or status.
// 'reply' is a convenient buffer that is free for us to use.
-void GCodes::CheckReportDue(GCodeBuffer& gb, const StringRef& reply) const
+void GCodes::CheckReportDue(GCodeBuffer& gb, const StringRef& reply) const noexcept
{
if (&gb == usbGCode)
{
diff --git a/src/GCodes/GCodes.h b/src/GCodes/GCodes.h
index 5ef2bfa7..edf25e4a 100644
--- a/src/GCodes/GCodes.h
+++ b/src/GCodes/GCodes.h
@@ -394,10 +394,10 @@ private:
void DisableDrives() noexcept; // Turn the motors off
bool SendConfigToLine(); // Deal with M503
- GCodeResult OffsetAxes(GCodeBuffer& gb, const StringRef& reply); // Set/report offsets
+ GCodeResult OffsetAxes(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Set/report offsets
#if SUPPORT_WORKPLACE_COORDINATES
- GCodeResult GetSetWorkplaceCoordinates(GCodeBuffer& gb, const StringRef& reply, bool compute); // Set workspace coordinates
+ GCodeResult GetSetWorkplaceCoordinates(GCodeBuffer& gb, const StringRef& reply, bool compute) THROWS(GCodeException); // Set workspace coordinates
# if HAS_MASS_STORAGE
bool WriteWorkplaceCoordinates(FileStore *f) const noexcept;
# endif
@@ -409,7 +409,7 @@ private:
// Wait for the heaters associated with the specified tool to reach their set temperatures
void GenerateTemperatureReport(const StringRef& reply) const noexcept; // Store a standard-format temperature report in reply
OutputBuffer *GenerateJsonStatusResponse(int type, int seq, ResponseSource source) const noexcept; // Generate a M408 response
- void CheckReportDue(GCodeBuffer& gb, const StringRef& reply) const; // Check whether we need to report temperatures or status
+ void CheckReportDue(GCodeBuffer& gb, const StringRef& reply) const noexcept; // Check whether we need to report temperatures or status
void RestorePosition(const RestorePoint& rp, GCodeBuffer *gb) noexcept; // Restore user position from a restore point
@@ -420,8 +420,8 @@ private:
float GetCurrentToolOffset(size_t axis) const noexcept; // Get an axis offset of the current tool
GCodeResult RetractFilament(GCodeBuffer& gb, bool retract); // Retract or un-retract filaments
- GCodeResult LoadFilament(GCodeBuffer& gb, const StringRef& reply); // Load the specified filament into a tool
- GCodeResult UnloadFilament(GCodeBuffer& gb, const StringRef& reply); // Unload the current filament from a tool
+ GCodeResult LoadFilament(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Load the specified filament into a tool
+ GCodeResult UnloadFilament(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Unload the current filament from a tool
bool ChangeMicrostepping(size_t axisOrExtruder, unsigned int microsteps, bool interp, const StringRef& reply) const noexcept; // Change microstepping on the specified drive
void CheckTriggers() noexcept; // Check for and execute triggers
void CheckFilament() noexcept; // Check for and respond to filament errors
@@ -441,7 +441,7 @@ private:
GCodeResult DefineGrid(GCodeBuffer& gb, const StringRef &reply) THROWS(GCodeException); // Define the probing grid, returning true if error
#if HAS_MASS_STORAGE
- GCodeResult LoadHeightMap(GCodeBuffer& gb, const StringRef& reply); // Load the height map from file
+ GCodeResult LoadHeightMap(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Load the height map from file
bool TrySaveHeightMap(const char *filename, const StringRef& reply) const noexcept; // Save the height map to the specified file
GCodeResult SaveHeightMap(GCodeBuffer& gb, const StringRef& reply) const; // Save the height map to the file specified by P parameter
#endif
@@ -452,16 +452,16 @@ private:
void InitialiseTaps(bool fastThenSlow) noexcept; // Set up to do the first of a possibly multi-tap probe
void SetBedEquationWithProbe(int sParam, const StringRef& reply); // Probes a series of points and sets the bed equation
- GCodeResult ConfigureTrigger(GCodeBuffer& gb, const StringRef& reply); // Handle M581
- GCodeResult CheckTrigger(GCodeBuffer& gb, const StringRef& reply); // Handle M582
- GCodeResult UpdateFirmware(GCodeBuffer& gb, const StringRef &reply); // Handle M997
- GCodeResult SendI2c(GCodeBuffer& gb, const StringRef &reply); // Handle M260
- GCodeResult ReceiveI2c(GCodeBuffer& gb, const StringRef &reply); // Handle M261
+ GCodeResult ConfigureTrigger(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Handle M581
+ GCodeResult CheckTrigger(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException); // Handle M582
+ GCodeResult UpdateFirmware(GCodeBuffer& gb, const StringRef &reply) THROWS(GCodeException); // Handle M997
+ GCodeResult SendI2c(GCodeBuffer& gb, const StringRef &reply) THROWS(GCodeException); // Handle M260
+ GCodeResult ReceiveI2c(GCodeBuffer& gb, const StringRef &reply) THROWS(GCodeException); // Handle M261
#if HAS_MASS_STORAGE || HAS_LINUX_INTERFACE
- GCodeResult SimulateFile(GCodeBuffer& gb, const StringRef &reply, const StringRef& file, bool updateFile); // Handle M37 to simulate a whole file
- GCodeResult ChangeSimulationMode(GCodeBuffer& gb, const StringRef &reply, uint32_t newSimulationMode); // Handle M37 to change the simulation mode
+ GCodeResult SimulateFile(GCodeBuffer& gb, const StringRef &reply, const StringRef& file, bool updateFile) THROWS(GCodeException); // Handle M37 to simulate a whole file
+ GCodeResult ChangeSimulationMode(GCodeBuffer& gb, const StringRef &reply, uint32_t newSimulationMode) THROWS(GCodeException); // Handle M37 to change the simulation mode
#endif
- GCodeResult WaitForPin(GCodeBuffer& gb, const StringRef &reply); // Handle M577
+ GCodeResult WaitForPin(GCodeBuffer& gb, const StringRef &reply) THROWS(GCodeException); // Handle M577
#if HAS_MASS_STORAGE
GCodeResult WriteConfigOverrideFile(GCodeBuffer& gb, const StringRef& reply) const noexcept; // Write the config-override file
diff --git a/src/Hardware/IoPorts.h b/src/Hardware/IoPorts.h
index 42c7b031..d39b3f88 100644
--- a/src/Hardware/IoPorts.h
+++ b/src/Hardware/IoPorts.h
@@ -24,7 +24,7 @@ public:
void Release() noexcept;
void AppendDetails(const StringRef& str) const noexcept;
- static size_t AssignPorts(GCodeBuffer& gb, const StringRef& reply, PinUsedBy neededFor, size_t numPorts, IoPort * const ports[], const PinAccess access[]);
+ static size_t AssignPorts(GCodeBuffer& gb, const StringRef& reply, PinUsedBy neededFor, size_t numPorts, IoPort * const ports[], const PinAccess access[]) THROWS(GCodeException);
bool AssignPort(GCodeBuffer& gb, const StringRef& reply, PinUsedBy neededFor, PinAccess access) THROWS(GCodeException);
static size_t AssignPorts(const char *pinNames, const StringRef& reply, PinUsedBy neededFor, size_t numPorts, IoPort * const ports[], const PinAccess access[]) noexcept;
diff --git a/src/Heating/Heat.cpp b/src/Heating/Heat.cpp
index ad7f22d4..5ca89ad3 100644
--- a/src/Heating/Heat.cpp
+++ b/src/Heating/Heat.cpp
@@ -456,7 +456,7 @@ void Heat::Diagnostics(MessageType mtype) noexcept
}
// Configure a heater. Invoked by M950.
-GCodeResult Heat::ConfigureHeater(GCodeBuffer& gb, const StringRef& reply)
+GCodeResult Heat::ConfigureHeater(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException)
{
const size_t heater = gb.GetLimitedUIValue('H', MaxHeaters);
@@ -811,7 +811,7 @@ bool Heat::WriteModelParameters(FileStore *f) const noexcept
#endif
// Process M570
-GCodeResult Heat::ConfigureHeaterMonitoring(size_t heater, GCodeBuffer& gb, const StringRef& reply)
+GCodeResult Heat::ConfigureHeaterMonitoring(size_t heater, GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException)
{
const auto h = FindHeater(heater);
if (h.IsNull())
diff --git a/src/Heating/Heat.h b/src/Heating/Heat.h
index bf37e91f..12ef77ed 100644
--- a/src/Heating/Heat.h
+++ b/src/Heating/Heat.h
@@ -120,8 +120,8 @@ public:
HeaterStatus GetStatus(int heater) const noexcept; // Get the off/standby/active status
bool HeaterAtSetTemperature(int heater, bool waitWhenCooling, float tolerance) const noexcept;
- GCodeResult ConfigureHeater(GCodeBuffer& gb, const StringRef& reply);
- GCodeResult ConfigureHeaterMonitoring(size_t heater, GCodeBuffer& gb, const StringRef& reply);
+ GCodeResult ConfigureHeater(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException);
+ GCodeResult ConfigureHeaterMonitoring(size_t heater, GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeException);
void SetActiveTemperature(int heater, float t) THROWS(GCodeException) { SetTemperature(heater, t, true); }
void SetStandbyTemperature(int heater, float t) THROWS(GCodeException) { SetTemperature(heater, t, false); }
diff --git a/src/Heating/Sensors/SensorWithPort.h b/src/Heating/Sensors/SensorWithPort.h
index 4705b942..4307d2bf 100644
--- a/src/Heating/Sensors/SensorWithPort.h
+++ b/src/Heating/Sensors/SensorWithPort.h
@@ -19,7 +19,7 @@ protected:
~SensorWithPort() noexcept;
// Try to configure the port
- bool ConfigurePort(GCodeBuffer& gb, const StringRef& reply, PinAccess access, bool& seen);
+ bool ConfigurePort(GCodeBuffer& gb, const StringRef& reply, PinAccess access, bool& seen) THROWS(GCodeException);
#if SUPPORT_REMOTE_COMMANDS
// Try to configure the port
diff --git a/src/Heating/Sensors/SpiTemperatureSensor.h b/src/Heating/Sensors/SpiTemperatureSensor.h
index 5f555479..ca78568c 100644
--- a/src/Heating/Sensors/SpiTemperatureSensor.h
+++ b/src/Heating/Sensors/SpiTemperatureSensor.h
@@ -16,7 +16,7 @@ class SpiTemperatureSensor : public SensorWithPort
protected:
SpiTemperatureSensor(unsigned int sensorNum, const char *name, SpiMode spiMode, uint32_t clockFrequency) noexcept;
- bool ConfigurePort(GCodeBuffer& gb, const StringRef& reply, bool& seen);
+ bool ConfigurePort(GCodeBuffer& gb, const StringRef& reply, bool& seen) THROWS(GCodeException);
#if SUPPORT_REMOTE_COMMANDS
bool ConfigurePort(const CanMessageGenericParser& parser, const StringRef& reply, bool& seen) noexcept;
diff --git a/src/Heating/Sensors/TemperatureSensor.h b/src/Heating/Sensors/TemperatureSensor.h
index 64a34309..9fb5702c 100644
--- a/src/Heating/Sensors/TemperatureSensor.h
+++ b/src/Heating/Sensors/TemperatureSensor.h
@@ -32,7 +32,7 @@ public:
// If we find any parameters, process them, if successful then initialise the sensor and return GCodeResult::ok.
// If an error occurs while processing the parameters, return GCodeResult::error and write an error message to 'reply.
// if we find no relevant parameters, report the current parameters to 'reply' and return 'false'.
- virtual GCodeResult Configure(GCodeBuffer& gb, const StringRef& reply, bool& changed);
+ virtual GCodeResult Configure(GCodeBuffer& gb, const StringRef& reply, bool& changed) THROWS(GCodeException);
#if SUPPORT_REMOTE_COMMANDS
// Configure the sensor from M308 parameters.