Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Error responses from /machine/code

    DSF Development
    2
    3
    61
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gtj0
      gtj0 last edited by

      @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

      1 Reply Last reply Reply Quote 0
      • chrishamm
        chrishamm administrators last edited by

        Thanks, I'll have a look. What version are you using, the latest one from the unstable package feed?

        Duet software engineer

        1 Reply Last reply Reply Quote 0
        • gtj0
          gtj0 last edited by

          Thanks @chrishamm . The git tag is 1.1.0.1.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA