Hi Miyako,

On Wed, Jan 31, 2018 at 9:55 PM, Keisuke Miyako via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> JSON Parse error can be handled with ON ERR CALL, because it is not a
> runtime error.
>
> "Current method name" requires range checking (see docs), but that is
> unrelated.
>
> you just have to be aware that OK isn't updated,
> you can consult "OB Is defined" instead.
>

Let me take a step back.

​I got a runtime error on the server (v15.5) from a component. The source
of the error is probably attempting to call PARSE Json on a malformed
string (that's the line of code referenced in the error dialog). The method
looks at the string to see if it begins with "{" or "[" but that's all the
validating it does. And there is an error handler installed to catch and
ignore errors so the server doesn't get blocked.

The docs suggest using JSON Parse in just such a way to validate JSON
strings but don't mention it won't work compiled.

So in a compiled app I don't see how I get to the point of using tools like
Ob is defined or OK because I don't get past the runtime parsing error. And
I'm not able to readily determine where the offending string comes from
because there's no way to log the error. (This particular method is reading
JSON data coming from outside 4D.)

I hope I've missed something along the way because I'm not coming up with
any good workarounds.

-- 
Kirk Brooks
San Francisco, CA
=======================

*We go vote - they go home*
**********************************************************************
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