Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13944 closed enhancement (fixed)

BorderContainer: child with missing region attribute should throw meaningful exception

Reported by: Jan Schatz Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:

Description

When a child of dijit.layout.BorderContainer? is missing the region attribute, you will get a meaningless exception thrown in dijit/layout/_LayoutWidget.js:214 saying "word is undefined" (or even "_d is undefined" if compressed). Since the region attribute in mandatory here, it should be checked before. If it is missing, a meaningful exception should be thrown.

Change History (5)

comment:1 Changed 10 years ago by bill

Summary: Child of dijit.layout.BorderContainer with missing region attribute should throw meaningful exceptionBorderContainer: child with missing region attribute should throw meaningful exception

Typically we don't bloat our code with exceptions about programming errors. Admittedly though, that error is somewhat obscure. I'll think about it / investigate how we handle other errors.

comment:2 Changed 10 years ago by bill

Owner: set to bill
Resolution: fixed
Status: newclosed

In [26807]:

Throw error when no region specified on BorderContainer child, as the naturally occurring exception is hard to understand. Fixes #13944 !strict.

comment:3 Changed 10 years ago by bill

Milestone: tbd1.7

comment:4 Changed 10 years ago by bill

In [26944]:

Fix test error where BorderContainer wasn't attached to document before startup(), causing spurious test failure on chrome, refs #13944.

comment:5 Changed 10 years ago by bill

In [26947]:

On 1.7 branch, fix test error where BorderContainer wasn't attached to document before startup(), causing spurious test failure on chrome, refs #13944.

Note: See TracTickets for help on using tickets.