REBOL3 tracker
  0.9.12 beta
Ticket #0001857 User: anonymous

Project:



rss
TypeBug Statusreviewed Date17-Feb-2011 08:24
Versionalpha 110 CategoryNative Submitted byBrianH
PlatformAll Severityminor Prioritynormal

Summary TRANSCODE/error of an invalid serialized constructor triggers the error it should insert
Description 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.
Example code
; 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]
    ] #{}]

Assigned ton/a Fixed in- Last Update27-Feb-2011 02:27


Comments

Date User Field Action Change
27-Feb-2011 02:27 carl Code Modified -
27-Feb-2011 02:27 carl Status Modified submitted => reviewed
17-Feb-2011 08:24 BrianH Ticket Added -