Example #1
0
        private static InvalidSpecificItemTypeException CreateInvalidSpecificItemTypeException(
            string itemId,
            Item item,
            Type type)
        {
            var message   = $"Item '{itemId}' is not of type '{type}'.";
            var exception = new InvalidSpecificItemTypeException(message);

            exception.Data.Add("itemId", itemId);
            exception.Data.Add("item", item.Type.ToString());
            exception.Data.Add("t", type);
            return(exception);
        }