parallaxinc / Parallax-ESP

Fork of http://git.spritesserver.nl/esphttpd.git/ with support for loading the Parallax Propeller
Other
12 stars 6 forks source link

Request for Invalid Handle/ID Error Code and Response #2

Closed PropGit closed 6 years ago

PropGit commented 8 years ago

On the Serial Interface, when calling a command like PATH with an invalid handle or id, the response is CMD_ERROR_INVALID_STATE.

Can we change this condition to respond with an error that means INVALID_HANDLE_ID (an error code that doesn't yet exist) instead of INVALID_STATE?

PropGit commented 8 years ago

<<< ON HOLD >>> It was later revealed that INVALID_STATE was an appropriate response for the specific case involved.

I'm still thinking we need an INVALID_HANDLE_ID error code as a possibility, but I will follow-up on this and either mark it closed, or indicate the continued need for it at that time.

dbetz commented 8 years ago

There are currently a lot of errors related to arguments that are just reported as "invalid argument". That error could be split into multiple error codes that are more specific. I just used "invalid argument" because it roughly parallels the Linux/Unix INVAL error code that means the same thing.