From b2e7c7a8d4289f24f36633bd32d2345b6f8f018f Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 4 Aug 2016 19:13:47 +0200 Subject: [PATCH] More specific exception when a conversion fails --- src/Umbraco.Core/Models/Property.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Models/Property.cs b/src/Umbraco.Core/Models/Property.cs index e5471217a5..dff6a712c7 100644 --- a/src/Umbraco.Core/Models/Property.cs +++ b/src/Umbraco.Core/Models/Property.cs @@ -135,7 +135,7 @@ namespace Umbraco.Core.Models private static void ThrowTypeException(object value, Type expected, string alias) { - throw new Exception(string.Format("Value \"{0}\" of type \"{1}\" could not be converted" + throw new InvalidOperationException(string.Format("Value \"{0}\" of type \"{1}\" could not be converted" + " to type \"{2}\" which is expected by property type \"{3}\".", value, value.GetType(), expected, alias)); }