Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Jonas Sicking
On Tue, Feb 8, 2011 at 10:48 AM, Jeremy Orlow jor...@chromium.org wrote: On Tue, Feb 8, 2011 at 10:38 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Feb 8, 2011 at 9:16 AM, Jeremy Orlow jor...@chromium.org wrote: On Tue, Feb 8, 2011 at 2:21 AM, Jonas Sicking jo...@sicking.cc wrote: On

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Jeremy Orlow
On Wed, Feb 9, 2011 at 3:22 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Feb 8, 2011 at 10:48 AM, Jeremy Orlow jor...@chromium.org wrote: On Tue, Feb 8, 2011 at 10:38 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Feb 8, 2011 at 9:16 AM, Jeremy Orlow jor...@chromium.org wrote:

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Jonas Sicking
On Wed, Feb 9, 2011 at 4:03 PM, Jeremy Orlow jor...@chromium.org wrote: On Wed, Feb 9, 2011 at 3:22 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Feb 8, 2011 at 10:48 AM, Jeremy Orlow jor...@chromium.org wrote: On Tue, Feb 8, 2011 at 10:38 AM, Jonas Sicking jo...@sicking.cc wrote: On

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread ben turner
Hm, Jeremy is right, If you want to look just at the transaction and see why it aborted you can't rely on errorCode. Ick. The only thing I'd change then is the abortMessage property. It's easier to tell why your transaction aborted with the error code, and I'd hate people doing string comparisons

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Jeremy Orlow
On Wed, Feb 9, 2011 at 5:17 PM, ben turner bent.mozi...@gmail.com wrote: Hm, Jeremy is right, If you want to look just at the transaction and see why it aborted you can't rely on errorCode. Ick. The only thing I'd change then is the abortMessage property. It's easier to tell why your

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread ben turner
Normal exceptions have error messages that are not consistient across implementations and are not localized.  What's the difference? These messages aren't part of any exception though, it's just some property on a transaction object. (None of our DOM exceptions, IDB or otherwise, have message

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Jonas Sicking
On Wed, Feb 9, 2011 at 5:43 PM, Jeremy Orlow jor...@chromium.org wrote: On Wed, Feb 9, 2011 at 5:37 PM, ben turner bent.mozi...@gmail.com wrote: Normal exceptions have error messages that are not consistient across implementations and are not localized.  What's the difference? These

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Glenn Maynard
On Wed, Feb 9, 2011 at 8:37 PM, ben turner bent.mozi...@gmail.com wrote: Normal exceptions have error messages that are not consistient across implementations and are not localized. What's the difference? These messages aren't part of any exception though, it's just some property on a

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread ben turner
(It's somewhat frustrating when they come back localized, but bearable.) Sounds like what you really want is more specific error codes, not really messages, right? -Ben

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Glenn Maynard
On Wed, Feb 9, 2011 at 9:04 PM, ben turner bent.mozi...@gmail.com wrote: (It's somewhat frustrating when they come back localized, but bearable.) Sounds like what you really want is more specific error codes, not really messages, right? Not always: - Some errors are

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Jonas Sicking
On Wed, Feb 9, 2011 at 6:39 PM, Glenn Maynard gl...@zewt.org wrote: On Wed, Feb 9, 2011 at 9:04 PM, ben turner bent.mozi...@gmail.com wrote: (It's somewhat frustrating when they come back localized, but bearable.) Sounds like what you really want is more specific error codes, not really

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Jeremy Orlow
On Wed, Feb 9, 2011 at 5:54 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Feb 9, 2011 at 5:43 PM, Jeremy Orlow jor...@chromium.org wrote: On Wed, Feb 9, 2011 at 5:37 PM, ben turner bent.mozi...@gmail.com wrote: Normal exceptions have error messages that are not consistient across

Re: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Glenn Maynard
On Wed, Feb 9, 2011 at 9:46 PM, Jonas Sicking jo...@sicking.cc wrote: - Some errors are implementation-specific. For example, if internal error is caused by SQLite under the hood returning an unexpected error that the browser can't recover from, the browser could include the SQLite error

RE: [IndexedDB] Reason for aborting transactions

2011-02-09 Thread Pablo Castro
(back!) From: public-webapps-requ...@w3.org [mailto:public-webapps-requ...@w3.org] On Behalf Of Jeremy Orlow Sent: Wednesday, February 09, 2011 6:47 PM On Wed, Feb 9, 2011 at 5:54 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Feb 9, 2011 at 5:43 PM, Jeremy Orlow jor...@chromium.org wrote:

Re: [IndexedDB] Reason for aborting transactions

2011-02-08 Thread Jonas Sicking
On Mon, Feb 7, 2011 at 8:05 PM, Jeremy Orlow jor...@chromium.org wrote: On Mon, Feb 7, 2011 at 7:36 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Jan 28, 2011 at 4:33 PM, Jeremy Orlow jor...@chromium.org wrote: We do that as well. What's the best way to do it API wise?  Do we need to

Re: [IndexedDB] Reason for aborting transactions

2011-02-08 Thread ben turner
Why not just expand our list of error codes to have multiple ABORT_ variants for each situation, and then always fire the abort event with a slightly different errorCode? That seems far simpler IMO. -Ben On Tue, Feb 8, 2011 at 2:21 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Feb 7, 2011

Re: [IndexedDB] Reason for aborting transactions

2011-02-08 Thread Jeremy Orlow
On Tue, Feb 8, 2011 at 2:21 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Feb 7, 2011 at 8:05 PM, Jeremy Orlow jor...@chromium.org wrote: On Mon, Feb 7, 2011 at 7:36 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Jan 28, 2011 at 4:33 PM, Jeremy Orlow jor...@chromium.org wrote:

Re: [IndexedDB] Reason for aborting transactions

2011-02-08 Thread Jonas Sicking
On Tue, Feb 8, 2011 at 9:16 AM, Jeremy Orlow jor...@chromium.org wrote: On Tue, Feb 8, 2011 at 2:21 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Feb 7, 2011 at 8:05 PM, Jeremy Orlow jor...@chromium.org wrote: On Mon, Feb 7, 2011 at 7:36 PM, Jonas Sicking jo...@sicking.cc wrote: On

Re: [IndexedDB] Reason for aborting transactions

2011-02-08 Thread ben turner
I think that's what Ben was suggesting. Yes. We already have ABORT_ERR, no reason we can't subdivide that since it's being overloaded. In fact I think it makes perfect sense. Add the following to IDBTransaction: I'm really not a fan of making IDBTransaction more complicated. We already have a

Re: [IndexedDB] Reason for aborting transactions

2011-02-08 Thread Jeremy Orlow
On Tue, Feb 8, 2011 at 11:37 AM, ben turner bent.mozi...@gmail.com wrote: I think that's what Ben was suggesting. Yes. We already have ABORT_ERR, no reason we can't subdivide that since it's being overloaded. In fact I think it makes perfect sense. That part of the spec seems completely

Re: [IndexedDB] Reason for aborting transactions

2011-02-07 Thread Jonas Sicking
On Fri, Jan 28, 2011 at 4:33 PM, Jeremy Orlow jor...@chromium.org wrote: We do that as well. What's the best way to do it API wise?  Do we need to add an IDBTransactionError object with error codes and such? I don't actually know. I can't think of a precedence. Usually you use different error

Re: [IndexedDB] Reason for aborting transactions

2011-02-07 Thread Jeremy Orlow
On Mon, Feb 7, 2011 at 7:36 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Jan 28, 2011 at 4:33 PM, Jeremy Orlow jor...@chromium.org wrote: We do that as well. What's the best way to do it API wise? Do we need to add an IDBTransactionError object with error codes and such? I don't

Re: [IndexedDB] Reason for aborting transactions

2011-01-28 Thread Jonas Sicking
On Fri, Jan 28, 2011 at 2:35 PM, Jeremy Orlow jor...@chromium.org wrote: Given that transactions can be aborted because of explicit action, internal errors, quota errors, and possibly other things in the future, I'm wondering if we should add some way for people to find out why the transaction