Jeff, I vote for bug. Though it could be it's 2 different errors as far as 4D is concerned with a compiler error tripping first which doesn't show up interpreted.
I've noticed -1 being returned as an error code for a really wide range of errors. Or, it's a case like this where the compiler trips before the actual coding error does. It makes it harder to figure out nonetheless. On Fri, Mar 3, 2017 at 7:06 AM, Jeffrey Kain via 4D_Tech < 4d_tech@lists.4d.com> wrote: > The following behaves differently in interpreted vs. compiled: > > C_OBJECT($oResponse) > C_TEXT($tResponse) > > ON ERR CALL("ErrHandler") > $tResponse:="False" > $oResponse:=JSON Parse($tResponse) > ON ERR CALL("") > > In interpreted mode, the error handler catches an Error value of 54, and > $oResponse is undefined. > > In compiled mode, the error handler catches an Error value of -1, and then > 4D throws a runtime error dialog on the screen for JSON Parse ("Attempting > to retype by using a pointer.") even though an ON ERR CALL is still in > effect. > > If I change the JSON Parse line to: > > $oResponse:=JSON Parse($tResponse;Is object) > > ... then 4D behaves the same in interpreted and compiled. Both catch an > error of -1 in the error handler and no runtime error is generated. > > Feature or bug? > > -- > Jeffrey Kain > jeffrey.k...@gmail.com > > > > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** -- Kirk Brooks San Francisco, CA ======================= ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************