code: function createModule(module) {
          var moduleInstance,
              moduleId;
  
          if (typeof module === 'function') {
              try {
                  moduleInstance = module();
              } catch (ex) {
                  if (module.getId) {
                      moduleId = module.getId();
                  } else {
                      moduleId = module.name;
                  }
  
                  error('Failed to create an instance of module "' + moduleId + '".',
                        'Application will continue running without the module. ' +
                        'See following exception stack for more details.',
                        ex.stack);
              }
          } else {
              moduleInstance = module;
          }
  
          addOne(moduleInstances, moduleInstance);
  
          return moduleInstance;
      }
docs: Creates a module instance from the passed framework
  @private
  
  @param {Function|Object} module what to obtain an instance of
  @memberOf application
  @return the module instance