Opened 16 years ago

Closed 14 years ago

#2230 closed enhancement (wontfix)

If Dojo Storage not initialized, but storage methods called, throw exception

Reported by: bradneuberg Owned by: bradneuberg
Priority: high Milestone: 1.4
Component: Storage/Flash Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Brad Neuberg)

Right now a common source of problems is this: folks start calling the Dojo Storage put(), get(), etc. methods BEFORE Dojo Storage is initialized. I want to add some defensive programming techniques here to help external users of the API so they get a better error message. If someone calls one of these methods, AND they have not added a Dojo Storage "loaded" event listener, throw an exception and print a message that they must add an event listener, also pointing them to the Dojo Storage Book page URL.

This will eliminate a common bug when working with Dojo Storage, which is that folks get strange Dojo Flash messages if they never added a Dojo Storage "loaded" event listener. This will help them see what is going on quicker and change their code.

Change History (5)

comment:1 Changed 16 years ago by bradneuberg

Type: defectenhancement

comment:2 Changed 15 years ago by dylan

Milestone: 0.91.0

comment:3 Changed 15 years ago by bradneuberg

Milestone: 1.01.1

comment:4 Changed 14 years ago by bradneuberg

Milestone: 1.11.4

comment:5 Changed 14 years ago by Brad Neuberg

Description: modified (diff)
Resolution: wontfix
Status: newclosed

I originally opened this as a reminder to myself to create some defensive programing for folks that use the Dojo Storage API. Its been around forever and I don't think I'll get to it, since other things are more important and I haven't really seen this issue happen that much in practice. Marking as WONTFIX.

Note: See TracTickets for help on using tickets.