From 7a11ac36356e38186e644efbd565265cffe8f6d9 Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 26 Mar 2026 14:36:35 +0100 Subject: [PATCH] Add PlaceholderResolutionException for unresolved placeholders Introduced PlaceholderResolutionException in the ReC.Application.Common.Exceptions namespace. This exception provides detailed context when a placeholder cannot be resolved due to a missing property with a specific column name, including the placeholder, column name, and input string. --- .../Exceptions/PlaceholderResolutionException.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/ReC.Application/Common/Exceptions/PlaceholderResolutionException.cs diff --git a/src/ReC.Application/Common/Exceptions/PlaceholderResolutionException.cs b/src/ReC.Application/Common/Exceptions/PlaceholderResolutionException.cs new file mode 100644 index 0000000..33a5f00 --- /dev/null +++ b/src/ReC.Application/Common/Exceptions/PlaceholderResolutionException.cs @@ -0,0 +1,11 @@ +namespace ReC.Application.Common.Exceptions; + +public class PlaceholderResolutionException(string placeholder, string columnName, string input) + : Exception($"Failed to resolve placeholder '{placeholder}'. No object contains a property with column name '{columnName}'. Input: '{input}'") +{ + public string Placeholder { get; } = placeholder; + + public string ColumnName { get; } = columnName; + + public string Input { get; } = input; +}