Ticket #2230 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 4 months ago

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
Severity: normal Keywords:
Cc:

Description (last modified by BradNeuberg) (diff)

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

Changed 2 years ago by bradneuberg

  • type changed from defect to enhancement

Changed 16 months ago by dylan

  • milestone changed from 0.9 to 1.0

Changed 14 months ago by bradneuberg

  • milestone changed from 1.0 to 1.1

Changed 9 months ago by bradneuberg

  • milestone changed from 1.1 to 1.4

Changed 4 months ago by BradNeuberg

  • status changed from new to closed
  • resolution set to wontfix
  • description modified (diff)

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.