Skip to content

Commit abb1f48

Browse files
committed
reverting changes, until I can figure out how to trick the Adobe parser
1 parent e279187 commit abb1f48

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

system/ioc/Builder.cfc

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,35 @@ component serializable="false" accessors="true" {
265265
true
266266
);
267267

268-
invoke(
269-
oModel,
270-
constructorName,
271-
constructorArgCollection
272-
);
268+
try {
269+
// Invoke constructor
270+
invoke(
271+
oModel,
272+
constructorName,
273+
constructorArgCollection
274+
);
275+
} catch ( any e ) {
276+
var reducedTagContext = e.tagContext
277+
.reduce( function( result, file ){
278+
if ( !result.done ) {
279+
if ( file.template.listLast( "/\" ) == "Builder.cfc" ) {
280+
result.done = true;
281+
} else {
282+
result.rows.append( "#file.template#:#file.line#" );
283+
}
284+
}
285+
return result;
286+
}, { rows : [], done : false } )
287+
.rows
288+
.toList( chr( 13 ) & chr( 10 ) );
289+
290+
throw(
291+
type : "Builder.BuildCFCDependencyException",
292+
message : "Error building: #arguments.mapping.getName()# -> #e.message# #e.detail#.",
293+
detail : "DSL: #len( arguments.mapping.getDSL() ) ? arguments.mapping.getDSL() : "none"#; Path: #arguments.mapping.getPath()#; Error Location: #reducedTagContext#",
294+
extendedInfo: "Current Injector -> #variables.injector.getName()#"
295+
);
296+
}
273297
}
274298

275299
return oModel;

0 commit comments

Comments
 (0)