You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified that I am running the latest version of the EcoreNetto
I have searched open and closed issues to ensure it has not already been reported
Description
Summary: Several helpers cast/index without guards, so bad inputs throw NullReferenceException/IndexOutOfRangeException instead of a meaningful HandlebarsException; one error message is also inaccurate.
Affected files:ECoreNetto.HandleBars/StringHelper.cs:47,59 (cast-then-use without null check), ECoreNetto.HandleBars/GeneralizationHelper.cs:71 (ESuperTypes[0] after an Any() check), ECoreNetto.HandleBars/StructuralFeatureHelper.cs:148 (message says "two arguments" but checks for one), ECoreNetto.Extensions/StringExtensions.cs:50 (words[0] without empty check)
Proposed solution: Add explicit argument/null/empty validation with descriptive messages; fix the inaccurate "two arguments" message to match the actual check.
Acceptance criteria:
Helpers throw descriptive HandlebarsException/ArgumentException on invalid input rather than low-level exceptions.
The argument-count error message matches the validation.
Prerequisites
Description
NullReferenceException/IndexOutOfRangeExceptioninstead of a meaningfulHandlebarsException; one error message is also inaccurate.ECoreNetto.HandleBars/StringHelper.cs:47,59(cast-then-use without null check),ECoreNetto.HandleBars/GeneralizationHelper.cs:71(ESuperTypes[0]after anAny()check),ECoreNetto.HandleBars/StructuralFeatureHelper.cs:148(message says "two arguments" but checks for one),ECoreNetto.Extensions/StringExtensions.cs:50(words[0]without empty check)HandlebarsException/ArgumentExceptionon invalid input rather than low-level exceptions.