Fix a NRE in the exception handler.

The exception handler would die if an error occurred before modData was initialized.