- From: <bugzilla@jessica.w3.org>
- Date: Thu, 28 Jun 2012 22:22:17 +0000
- To: public-webapps@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17643
Summary: What should transaction.error be set to if a error
handler throws an exception
Product: WebAppsWG
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Indexed Database API
AssignedTo: dave.null@w3.org
ReportedBy: jonas@sicking.cc
QAContact: public-webapps-bugzilla@w3.org
CC: mike@w3.org, public-webapps@w3.org
The most basic question is, what should happen in the following scenario:
objectStore.add("value", 1); // succeeds
req = objectStore.add("value", 1); // will fail due to key collision
req.onerror = function(e) {
throw;
}
This should obviously abort the transaction, but should transaction.error.name
return "ConstraintError" or "AbortError".
I don't have a strong opinion.
It sort of feels like the exception does override normal behavior, so we should
set it to "AbortError".
--
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Thursday, 28 June 2012 22:22:28 UTC