Skip to content

Commit

Permalink
Add note on better reporting for a missing component
Browse files Browse the repository at this point in the history
  • Loading branch information
hugithordarson committed Feb 11, 2024
1 parent 142ba1d commit b8a11c8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,13 @@ public void didParseClosingWebObjectTag( final String parsedString ) throws NGDe
throw new NGHTMLFormatException( message );
}

// FIXME: We need a way here to catch and report better the error of "no found dynamic element. The old way of catching RuntimeException feels super weird so we need to think it out // Hugi 2022-10-07
// try {
final NGElement element = _currentDynamicTag.dynamicElement( _declarations, _languages );
_currentDynamicTag = dynamicTag;
_currentDynamicTag.addChildElement( element );
// }
// catch( RuntimeException e ) { // CHECKME: Catching RuntimeException feels super weird. Stopping it but keeping this around for a bit // Hugi 2022-10-07
// catch( RuntimeException e ) {
// final String templ = "Unable to load the component named '%s' with the declaration %s. Make sure the .wo folder is where it's supposed to be and the name is spelled correctly.";
// throw new RuntimeException( templ.formatted( componentName( _currentDynamicTag ), prettyPrintDeclaration( _declarations.get( _currentDynamicTag.name() ) ) ), e );
// }
Expand Down

0 comments on commit b8a11c8

Please sign in to comment.