Error responses from /machine/code
-
@chrishamm I haven't looked at the code to know but how hard would it be to get real responses when something goes wrong. For instance if you send M36 without a filename, the response is
Failed to execute command SimpleCode: System.NullReferenceException: Object reference not set to an instance of an object.
with a corresponding stack trace...
DuetControlServer[20646]: [err] Failed to execute command SimpleCode: System.NullReferenceException: Object reference not set to an instance of an object. DuetControlServer[20646]: at DuetControlServer.Codes.MCodes.CodeExecuted(Code code) in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetControlServer/Codes/MCodes.cs:line 637 DuetControlServer[20646]: at DuetControlServer.Commands.Code.CodeExecuted() in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 338 DuetControlServer[20646]: at DuetControlServer.Commands.Code.Execute() in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 204 DuetControlServer[20646]: at DuetControlServer.Commands.SimpleCode.Execute() in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetControlServer/Commands/SimpleCode.cs:line 39 DuetControlServer[20646]: at DuetAPI.Commands.Command`1.Invoke() in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetAPI/Commands/BaseCommand.cs:line 86 DuetControlServer[20646]: at DuetControlServer.IPC.Processors.Command.Process() in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetControlServer/IPC/Processors/Command.cs:line 61
If you supply a name that doesn't exist, at least you get a JSON response with
err: 1
-
Thanks, I'll have a look. What version are you using, the latest one from the unstable package feed?
-
Thanks @chrishamm . The git tag is 1.1.0.1.