Closed
Bug 559678
Opened 16 years ago
Closed 16 years ago
Better errors for Storage transactions misuse
Categories
(Core :: SQLite and Embedded Database Bindings, defect)
Core
SQLite and Embedded Database Bindings
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a4
People
(Reporter: mak, Assigned: mak)
References
Details
Attachments
(1 file, 3 obsolete files)
|
3.36 KB,
patch
|
Details | Diff | Splinter Review |
return NS_ERROR_UNEXPECTED (Shawn prefers this one so we don't have to rev uuid) if a transaction does not exist on COMMIT or ROLLBACK, fix idls (were never updated) and WARN the sqlite error code if it's unknown.
I guess Andrew's review is enough here, feel free to forward if i'm wrong please.
Thanks.
Attachment #439370 -
Flags: review?(bugmail)
Comment 1•16 years ago
|
||
Comment on attachment 439370 [details] [diff] [review]
patch v1.0
Should you be using NS_LITERAL_CSTRING for your error message?
Assuming Shawn has signed off on the error changes, my review probably works? In general I think you want to direct all reviews to sdwilsh, though.
Attachment #439370 -
Flags: review?(bugmail) → review+
Comment 2•16 years ago
|
||
(In reply to comment #1)
> Assuming Shawn has signed off on the error changes, my review probably works?
> In general I think you want to direct all reviews to sdwilsh, though.
You are a peer ;)
| Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #1)
> (From update of attachment 439370 [details] [diff] [review])
> Should you be using NS_LITERAL_CSTRING for your error message?
good question, i see in code we use both forms, i guess Append has overloads, i'm unsure what's the "cheapest" one, not that i care much since this is debug only and pretty rare.
| Assignee | ||
Comment 4•16 years ago
|
||
Gavin suggested AppendLiteral, that works too, since he's more experienced, i'll just go for it.
Attachment #439370 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•16 years ago
|
||
maybe attach the right patch, eh? :)
Attachment #439380 -
Attachment is obsolete: true
| Assignee | ||
Comment 6•16 years ago
|
||
yay! Looks like Storage had a test for this exception, fixed it to check NS_ERROR_UNEXPECTED.
Attachment #439381 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a4
| Assignee | ||
Comment 8•16 years ago
|
||
i'll push a followup to use better (less scarying) wording in the warning.
Comment 9•16 years ago
|
||
(In reply to comment #8)
> i'll push a followup to use better (less scarying) wording in the warning.
Thanks mak!
| Assignee | ||
Comment 10•16 years ago
|
||
Better warning
http://hg.mozilla.org/mozilla-central/rev/131c1b4b9d2c
Updated•2 years ago
|
Product: Toolkit → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•