W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2013

[IndexedDB] IDBRequest.onerror for DataCloneError and DataError

From: Kyaw Tun <kyawtun@yathit.com>
Date: Mon, 20 May 2013 09:37:04 +0800
Message-ID: <CAFPCW95gta8KvyPfe5wDQoLXCDfdKofe17sk0akb0_vp3J08uA@mail.gmail.com>
To: Webapps WG <public-webapps@w3.org>
Sorry for reposting again for
http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0422.html Perhaps
I am not well explain enough.

In put and add method of object store and index, DataCloneError and
DataError are immediately throw before executing IDBRequest. It seems good
that exception are throw immediately, but in practical use case, these
exception are in async workflow (inside transaction callback). Exception
break the async workflow, (of course, it depending on usage design
pattern).

DataCloneError and DataError are preventable in most situation. But
sometimes tricky. We even want database to handle these errors like
database constraint. The logic will be much simpler if DataCloneError and
DataError cause to invoke IDBRequest.onerror rather than exception.
Received on Monday, 20 May 2013 01:37:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:18:49 UTC