Has anything moved on this issue? Just today I was getting runtime errors on the server. You know, the open dialog, processes hung up. Sigh. It was in a component so i dug into to see why the error was propagating to the level of stopping things and found exactly this situation.
Even more, in the midst of looking at things I noticed this quote on the JSON Parse <http://doc.4d.com/4Dv15/4D/15.5/JSON-Parse.301-3577097.en.html> docs: "This string must be formatted correctly, otherwise a parsing error is generated. JSON Parse can therefore be used to validate JSON strings." And thought: uh - cool. I'll just make a method to test strings more completely. And ran right into this issue when it's compiled. I hate this sort of stuff. Kirk Brooks San Francisco, CA ======================= *We go vote - they go home* On Fri, Mar 3, 2017 at 7:06 AM, Jeffrey Kain via 4D_Tech < [email protected]> 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 > [email protected] > ********************************************************************** 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:[email protected] **********************************************************************

