Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path may render error message meaningless #5483

Open
hiiamboris opened this issue Feb 17, 2024 · 1 comment
Open

Path may render error message meaningless #5483

hiiamboris opened this issue Feb 17, 2024 · 1 comment
Assignees
Labels
type.review Ticket describes a possible improvement.

Comments

@hiiamboris
Copy link
Collaborator

Describe the bug

When evaluated this code does not display the meaning of the error:

data: [[1 2 3 4]]
row-order: []
included-rows: [1]
column-order: [1 2 3 4]
included-columns: [1 2]
row: 1 column: 2
:data/(row-order/(included-rows/:row))/(column-order/(included-columns/:column))
*** Script Error: path :data/(row-order/(included-rows/:row))/(column-order/(included-columns/:column)) 
*** Where: catch
*** Near : :data/(row-order/(included-rows/:row))/()
*** Stack:  

Only the path fits in, but not what's wrong.

Expected behavior

When molded, error meaning should take priority over code parts (Near field seems to handle that fine).

Platform version
Red 0.6.5 for Windows built 14-Feb-2024/15:03:12+03:00 commit #d3409ba

@dockimbel dockimbel self-assigned this Feb 17, 2024
@dockimbel dockimbel added the type.review Ticket describes a possible improvement. label Feb 17, 2024
@dockimbel
Copy link
Member

A quick workaround:

>> probe try [:data/(row-order/(included-rows/:row))/(column-order/(included-columns/:column))]
make error! [
    code: 333
    type: 'script
    id: 'bad-path-type
    arg1: :data/(row-order/(included-rows/:row))/(column-order/(included-columns/:column))
    arg2: none!
    arg3: none
    near: [:data/(row-order/(included-rows/:row))/(column-order/(included-columns/:column))]
    where: 'try
    stack: 76780232
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type.review Ticket describes a possible improvement.
Projects
None yet
Development

No branches or pull requests

2 participants