SimpleBooleanLexer produces extremely unhelpful error messages.

Description

The new logic lexer writes some very unhelpful error messages to the console.
Here is one that I get when I open the Material Receipt window:

line 1:14 token recognition error at: '''

Expected Behavior:
At least the AD_Field ID of the field that produces the error would be very helpful.
A complete error message should Include WindowName, Tabname, Fieldname and the string that causes the error.

I did some debugging and found that the error is in the display logic of the Drop Ship Business Partner field.

@IsDropShip@=Y'

Note the lonely single quote at the end of the string.
AD_Field_IDs of the fields with the error present: 57734, 55427
I did not edit these fields so I assume the error is also in the seed DB.

Environment

None

Activity

Tony Snook 
November 15, 2021 at 2:32 AM

I have added the additional fixes as suggested by Carlos.

C_POSPayment.Processed (ReadOnlyLogic)

AD_Column_ID = 200452 N ==> NULL

ExpenseReport.Reportline.Quantity Reimbursed (DisplayLogic)

AD_Field_ID = 10456 Processed=Y ==> @Processed@=Y

ExpenseReport.Reportline.Price Reimbursed (DisplayLogic)

AD_Field_ID = 10457 Processed=Y ==> @Processed@=Y

AD_Package_Exp_Common.SQLStatement (DisplayLogic)

AD_Field_ID = 50135 @Type@='D'|Type@='SQL' ==> @Type@='D'|@Type@='SQL'

Tony Snook 
November 14, 2021 at 11:19 AM

I have checked the database and there are 3 occurrences of unmatched quotes in dictionary logic type columns. I have manually created migration scripts to correct this, but only if the columns contain the identical content as shown on the left:

AD_Field_ID = 55427 (DisplayLogic)
@IsDropShip@=Y'    ==>  @IsDropShip@='Y'

AD_Field_ID = 57734 (DisplayLogic)
@IsDropShip@=Y'    ==>    @IsDropShip@='Y'

AD_Field_ID = 59348 (DisplayLogic)
@A_SourceType@='MAN''    ==>    @A_SourceType@='MAN'

If the DisplayLogic contents have been changed, then no update will occur.

Will create a pull request if this is useful.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created September 10, 2021 at 3:02 PM
Updated January 2, 2022 at 3:37 PM
Resolved November 16, 2021 at 10:33 AM