Commit 00e7d708 authored by vosen's avatar vosen

Slightly improved error message for when we can't find a proper constructor.

parent fe9b9f5a
...@@ -1540,7 +1540,7 @@ static List<FieldInfo> GetSettableFields(Type t) ...@@ -1540,7 +1540,7 @@ static List<FieldInfo> GetSettableFields(Type t)
} }
if (!hasDefaultConstructor && specializedConstructor == null) if (!hasDefaultConstructor && specializedConstructor == null)
{ {
throw new InvalidOperationException("A parameterless default constructor or one matching order, names and types of values returned by the query is required to allow for dapper materialization"); throw new InvalidOperationException(String.Format("Cannot find constructor for type {0}. A parameterless default constructor or one matching order, names and types of values returned by the query is required to allow for dapper materialization", type.FullName));
} }
} }
il.BeginExceptionBlock(); il.BeginExceptionBlock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment