Skip to content

Commit

Permalink
more ACF issues. Just removing try and letting error bubble up
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Sep 20, 2024
1 parent 946ce0a commit e279187
Showing 1 changed file with 5 additions and 39 deletions.
44 changes: 5 additions & 39 deletions system/ioc/Builder.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -265,45 +265,11 @@ component serializable="false" accessors="true" {
true
);

try {
// Invoke constructor, we do this because using invoke() can be slow
if ( constructorName eq "init" ) {
oModel.init( argumentCollection = constructorArgCollection );
} else {
invoke(
oModel,
constructorName,
constructorArgCollection
);
}
} catch ( any e ) {
var reducedTagContext = e.tagContext
.reduce( function( result, file ){
if ( !result.done ) {
if ( file.template.listLast( "/\" ) == "Builder.cfc" ) {
result.done = true;
} else {
result.rows.append( "#file.template#:#file.line#" );
}
}
return result;
}, { rows : [], done : false } )
.rows
.toList( chr( 13 ) & chr( 10 ) );

var throwAttributes = {
type : "Builder.BuildCFCDependencyException",
extendedInfo : "Current Injector -> #variables.injector.getName()#"
};

if ( server.keyExists( "boxlang" ) ) {
throwAttributes.object = e;
} else {
throwAttributes.message = "Error building: #arguments.mapping.getName()# -> #e.message# #e.detail#.";
throwAttributes.detail = "DSL: #len( arguments.mapping.getDSL() ) ? arguments.mapping.getDSL() : "none"#; Path: #arguments.mapping.getPath()#; Error Location: #reducedTagContext#";
}
throw( argumentCollection = throwAttributes );
}
invoke(
oModel,
constructorName,
constructorArgCollection
);
}

return oModel;
Expand Down

0 comments on commit e279187

Please sign in to comment.