robmcmullen/peppy — Issue #760: Error during error mode creation hides real error
Author: robmcmullen
Created: 2012-02-21 06:09:52+00:00
State: open
Labels: major mode

*[Trac time 20090822 142400Z]* When an error happens during major mode creation, the exception that gets displayed in the error/crash reporter is usually
```
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 1461
8, in
lambda event: event.callable(*event.args, **event.kw) )
File "/home/rob/src/peppy/peppy/fileopener.py", line 244, in finalizeAfterSucc
essfulLoad
File "/home/rob/src/peppy/peppy/notebook.py", line 285, in newMode
File "/home/rob/src/peppy/peppy/notebook.py", line 200, in updateWrapper
File "/home/rob/src/peppy/peppy/frame.py", line 693, in switchMode
File "/home/rob/src/peppy/peppy/frame.py", line 471, in setMenumap
File "/home/rob/src/peppy/peppy/menu.py", line 305, in updateActions
File "/home/rob/src/peppy/peppy/menu.py", line 391, in updateMenuAccelerators
File "z:\src\peppy\peppy\actions\__init__.py", line 890, in insertIntoMenu
ListAction.insertIntoMenu(self, menu, accel, pos)
File "z:\src\peppy\peppy\actions\__init__.py", line 695, in insertIntoMenu
self._insertItems(menu, accel, pos, is_toplevel)
File "z:\src\peppy\peppy\actions\__init__.py", line 698, in _insertItems
items = self.getItems()
File "/home/rob/src/peppy/peppy/mainmenu.py", line 850, in getItems
AttributeError: 'NoneType' object has no attribute 'getKeywordOrder'
```
which is a result of the failure to create the major mode to display the error, not the original error itself. (This error is due to the minor modes not being created.)