anchor.diff:  									</cfswitch> 				  								
   								</cfloop>
   							</cfinvoke>
  -						
  +							
  +							<cfcatch type="any">
  +								<cfthrow type="coldspring.beanCreationException" 
  +									message="Bean creation exception during init() of #beanDef.getBeanClass()#" 
  +									detail="#cfcatch.message#">
  +							</cfcatch>
  +						</cftry>
   						
   						<cfelseif md.functions[functionIndex].name eq "setBeanFactory"
   								  and arraylen(md.functions[functionIndex].parameters) eq 1
  
positive.code: 						</cfif>
  					</cfif>
  					
  					
  					<!--- now call the 'constructor' to generate the bean, which is the factoryMethod --->
  					<cfinvoke component="#factoryBean#" method="#beanDef.getFactoryMethod()#" 
  						returnvariable="beanInstance">
  						<!--- loop over constructor-args and pass them into the factoryMethod --->
  						<cfloop collection="#argDefs#" item="arg">
  							<cfswitch expression="#argDefs[arg].getType()#">
  								<cfcase value="value">
  									<cfinvokeargument name="#argDefs[arg].getArgumentName()#" value="#argDefs[arg].getValue()#"/>
  								</cfcase>
  								<cfcase value="list,map">
  									<cfinvokeargument name="#argDefs[arg].getArgumentName()#" value="#constructComplexProperty(argDefs[arg].getValue(),argDefs[arg].getType(), localBeanCache)#"/>
  								</cfcase>
  								<cfcase value="ref,bean">
  									<cfset dependentBeanDef = getBeanDefinition(propDefs[prop].getValue()) />
  									<cfif dependentBeanDef.isSingleton()>
  										<cfset dependentBeanInstance = dependentBeanDef.getInstance() />
  									<cfelse>
  										<cfif dependentBeanDef.isFactory()>
  											<cfset dependentBeanInstance = localBeanCache[dependentBeanDef.getBeanID()].getObject() />
  										<cfelse>
  											<cfset dependentBeanInstance = localBeanCache[dependentBeanDef.getBeanID()] />
  										</cfif>
  									</cfif>
  									<cfinvokeargument name="#argDefs[arg].getArgumentName()#" value="#dependentBeanInstance#"/>
  								</cfcase>								  
  							</cfswitch> 				  								
  						</cfloop>
  					</cfinvoke>
  				
  					
  					<!--- since we skipped factory beans in the bean creation loop, we need to store a reference to the bean now --->
  					<cfif beanDef.isSingleton() and not(singletonCacheContainsBean(beanDef.getBeanID()))>
  						<cfset beanDef.getBeanFactory().addBeanToSingletonCache(beanDef.getBeanID(), beanInstance ) />
  					<cfelse>
  						<cfset localBeanCache[beanDef.getBeanID()] = beanInstance /> 
  					</cfif>
  					<cfset md = flattenMetaData(getMetaData(beanInstance))/>
  				
  				</cfif>
  				
  				<cfif structKeyExists(md, "functions")>
  
negative.code: 						<cfif md.functions[functionIndex].name eq "init"
  								and beanDef.getFactoryBean() eq "">
  							
  							<cftry>
  							<cfinvoke component="#beanInstance#" method="init">
  								<!--- loop over any bean constructor-args and pass them into the init() --->
  								<cfloop collection="#argDefs#" item="arg">
  