Skip to content

[BUG] Formater does not understand TRY-CATCH-END Constructs #115

Open

Description

@Larrylaswell

OpenQMx64 3_4_19
VSCODE 1.46.1 Date 2020-06-17
Windows NTx64 10.0.18363
MV Basic / MV Extentions 2.08

The formater does not handle the TRY - CATCH- END CONSTRUCT

For example this is what a TRY-CATCH-END construct should look like

 TRY
      GOSUB READ.RECORD
 CATCH IOERROR
      GOSUB HANDLE.IO.ERROR
 CATCH SYS$ANY
      GOSUB HANDLE.SYSTEM.ERROR
 END

 makeWritableCmd = 'attrib -r ':sysPath:'\':toLibrary:'\':toProgram
 setReadOnlyCmd = 'attrib +r ':sysPath:'\':toLibrary:'\':toProgram
 delFromFileCmd = 'DEL ':sysPath:'\':fromLibrary:'\':fromProgram

However when you format it it comes out as:

   TRY
   GOSUB READ.RECORD
   CATCH IOERROR
   GOSUB HANDLE.IO.ERROR
   CATCH SYS$ANY
   GOSUB HANDLE.SYSTEM.ERROR

END

makeWritableCmd = 'attrib -r ':sysPath:'':toLibrary:'':toProgram
setReadOnlyCmd = 'attrib +r ':sysPath:'':toLibrary:'':toProgram
delFromFileCmd = 'DEL ':sysPath:'':fromLibrary:'':fromProgram

Note that the GOSUBS are not indented. The CATCH statement is not outdented to match the TRY statement and the END statement gets outdented and its outdent becomes the base line indent for all future statements. The END statemement and all following statements should match the indent of the TRY statement.

Activity

  1. changed the title [-][BUG] MV Basic Extention - Formater does not understand TRY-CATCH-END Constructs[/-] [+][BUG] Formater does not understand TRY-CATCH-END Constructs[/+] on Jun 29, 2020
  2. itsxallwater commented on Aug 11, 2020

    @itsxallwater
    Member

    Similar note here, will ultimately relate to #14 and #114

  3. added theissue type on Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions