code-pal-for-abap icon indicating copy to clipboard operation
code-pal-for-abap copied to clipboard

quote comment alignment in empty CATCH block

Open jmgrassau opened this issue 3 years ago • 1 comments

Hello,

given the following code in which a CATCH block contains only a comment line …

    TRY.
        any_method( ).
      CATCH cx_any_exception.
        " comment
    ENDTRY.

… Code Pal raises the message "Quote comments indent along with the statements they comment!"

However, this is how the PrettyPrinter aligns the comment, and it is also where you would expect any content inside the CATCH block. Would Code Pal expect the comment to be aligned with ENDTRY?

(Yes, I know, you shouldn't have empty CATCH blocks, but that's a different story; maybe the comment explains exactly that!)

Kind regards, Jörg-Michael

jmgrassau avatar Feb 17 '22 15:02 jmgrassau

What version are you using? This should already be covered by this line, which was part of version 1.0.7. (merge)

bjoern-jueliger-sap avatar Mar 16 '22 10:03 bjoern-jueliger-sap

No reproduction in current version.

bjoern-jueliger-sap avatar Sep 06 '22 10:09 bjoern-jueliger-sap