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
**********************************************************************

Reply via email to