[OpenLayers-Users] Improving JSON support ( native and throwing/reporting errors )

Zac Spitzer zac.spitzer at gmail.com
Tue Jun 15 03:47:12 EDT 2010


So is the plan to match the current behavior (for non-native JSON) by adding
a try catch ignore or should we change it to thow useful exceptions for both
cases?

z


On 15 June 2010 17:32, Frederic Junod <frederic.junod at camptocamp.com> wrote:
> Hello,
>
> On Tue, Jun 15, 2010 at 4:59 AM, Zac Spitzer <zac.spitzer at gmail.com> wrote:
>> Looking at format JSON.js file,  it's classic example of where OL fails silently
>>
>> the code first runs a regex to validate the JSON, which returns null
>> if it doesn't validate
>> and then if it passes the initial validate and then crashes, it's also
>> wrapped in a try catch
>> which simples ignores any errors
>>
>> what is the normal convention to report / throw errors in OL? Failing
>> silently is nasty
>
> The problem is described here: http://trac.openlayers.org/ticket/1669
>
>
>> Also now that IE, FF and a few others have native JSON support, how does
>> everyone feel about conditionally using the native JSON when it's available
>
> It would be a great addition, I've started working on that, see:
> http://trac.openlayers.org/ticket/1807
>
> --
> Frédéric Junod
> Camptocamp SA
>



-- 
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168



More information about the Users mailing list