I'm trying to get the pascal language server working on Visual Studio Code and 
during testing I found that sending null values to the server is causing 
problems. i.e.:

...
    "processId": 3997,
    "clientInfo": {
        "name": "vscode",
        "version": "1.47.3"
    },
    "rootPath": null,
    "rootUri": null,
...

This is translated by the RPC layer to a message like:

{"jsonrpc":"2.0","error":{"code":-32603,"message":"Cannot convert data from 
Null value"},"id":1}

According to the protocol null values are allowed so is there a  way I can 
accept null values gracefully instead of failing with an error? In particular 
rootPath is trying to be mapped to a string so it could be translated to just 
'' and that would be better than giving this error that prevents the server 
from working entirely and causes very confusing errors that are hard to debug.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to