-
Notifications
You must be signed in to change notification settings - Fork 55
Description
In developing for #514 I have found that the URIParsingContexts provide wrong line numbers either in startLine method or the enclosingCodeWithLineNumbers method.
I have 2 examples, where the normal fault messege is printed followed by a line with sourceName() concatenated with startLine(), with the last line being the output of enclosingCodeWithLineNumbers():
The first is in the called service where the fault comes from throw( error, "an error" ) on line 25 according to VS code.
Here we see the enclosingCodeWithLineNumbers() method gives wrong line number and data:
Feb 12, 2025 5:59:48 PM thrower.ol
INFO: [throwembed2.ol -> thrower.ol -> bug] Thrown unhandled fault: error
Content (if any):string = "an error"
/workspaces/jolie/test/../faultlinesManualTests/thrower.ol:25
26: res
The second is the caller which calls the called service with add@test(1)(c) on line 15.
Here we see the startLine() method giving the wrong line number:
Feb 12, 2025 5:59:48 PM throwembed2.ol
INFO: [throwembed2.ol] Thrown unhandled fault: error
Content (if any):string = "an error"
/workspaces/jolie/test/../faultlinesManualTests/throwembed2.ol:14
15: add@test(
I do not know if #581 fixes these cases.