File tree 1 file changed +29
-5
lines changed
1 file changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -265,11 +265,35 @@ component serializable="false" accessors="true" {
265
265
true
266
266
);
267
267
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
+ }
273
297
}
274
298
275
299
return oModel ;
You can’t perform that action at this time.
0 commit comments