No internet connection
  1. Home
  2. Ideas

Feature request: add failure message when script contains errors

By joel.r.langlois @joel_r_langlois
    2022-01-13 19:35:28.895Z

    Presently, if one makes a typo or copy/pastes something incorrectly - or does anything invalid in the source code window really - we get no UI feedback if that's the case.

    • 5 replies
    1. Hi Joel,

      You should see a red underline if you do anything invalid in the editor that can be statically analyzed. Have you found a case where that's not what happens?

      1. Jjoel.r.langlois @joel_r_langlois
          2022-01-13 19:55:13.670Z

          I've not found the underlines to necessarily be accurate (eg: when early returning to skip some functionality, red squiggles sometimes happen on the next line), nor obvious (especially when the script extends outside of the source code editor).

          It would be better to have state with utmost obviousness "error, line XYZ, message" outside of the editor itself (or overlaid till rectified or dismissed).

          1. Hi Joel,

            We're using the Monaco Editor which is also what powers Visual Studio Code. Changing how the Javascript/Typescript service analyzes things is outside of the scope of what we'd be able to do in SF, as we're not interested in forking those repos, but you could report it to the Monaco editor team:

            https://github.com/microsoft/monaco-editor

            1. Jjoel.r.langlois @joel_r_langlois
                2022-01-13 19:58:56.954Z

                Good to know! I'll have a gander at that repo.

          2. J
            In reply tojoel_r_langlois:
            joel.r.langlois @joel_r_langlois
              2022-01-13 20:05:15.371Z

              It looks like Monaco indirectly provides an error list by providing its full list of code markers, of which you can filter down the errors. Related StackOverflow post: https://stackoverflow.com/a/46065907

              Docs: