Skip to content
New issue

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

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

Already on GitHub? # to your account

TRANSCODE/error of an invalid serialized constructor triggers the error it should insert #1857

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Assignees

Comments

@Siskin-Bot
Copy link
Collaborator

Submitted by: BrianH

When you use the /error option of TRANSCODE it should not trigger syntax errors, it should insert the error object in the return value untriggered. However, it triggers the error instead, as if the /error option wasn't specified.

; Properly formed but semantically invalid constructor
>> transcode/error to-binary "#[block! 1]"
** Syntax error: invalid constructor: [block! 1]
** Where: transcode
** Near: transcode/error to-binary "#[block! 1]"

; The above should return something like this instead
== [make error! [
        code: 205
        type: 'Syntax
        id: 'malconstruct
        arg1: [block! 1]
        arg2: none
        arg3: none
        near: "(line 1) #[block! 1]"
        where: [transcode]
    ] #{}]

; Bad syntax (note the badly formed error)
>> transcode/error to-binary "#["
** Syntax error: invalid constructor: make error! [
    code: 201
    type: 'Syntax
    id: 'missing
    arg1: "end-of-script"
    arg2: "]"
    arg3: none
    near: "(line 1) #["
    where: [transcode]
]
** Where: transcode
** Near: transcode/error to-binary "#["

; This is what should happen in the above case
== [make error! [
        code: 201
        type: 'Syntax
        id: 'missing
        arg1: "end-of-script"
        arg2: "]"
        arg3: none
        near: "(line 1) #["
        where: [transcode]
    ] #{}]

Imported from: CureCode [ Version: alpha 110 Type: Bug Platform: All Category: Native Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#1857

Comments:


Rebolbot mentioned this issue on Jan 12, 2016:
wrong error on load "1abcde"


Rebolbot mentioned this issue on Jan 22, 2016:
[Epic] Holes in our evaluation model


Rebolbot added the Type.bug on Jan 12, 2016


@Oldes Oldes self-assigned this Aug 7, 2022
@Oldes Oldes added Test.written Oldes.resolved Bugs/wishes with Oldes' fixes/features labels Aug 8, 2022
Oldes added a commit to Oldes/Rebol3 that referenced this issue Aug 9, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants