[javascript] Proper way to catch exception from JSON.parse