[Bug] When parsing invalid message, exception is catched, but the control
is not finished. Going to following lines, other exception would be raised.
We need to finish execution for invalid message.
[Verification] Code compiles without errors.
Change-Id: I65784e775b9a765332c4a1f0a19b8184e896872c
Signed-off-by: Piotr Kosko/Native/Web API (SWP) /SRPOL/Professional/삼성전자 <p.kosko@samsung.com>
try {
var msg = JSON_.parse(json);
} catch (error) {
- xwalk.utils.error('Invalid JSON received: ' + json);
+ xwalk.utils.error('Ignoring message - Invalid JSON received: ' + json);
+ return;
}
var id;