<commit_before>using System;
using System.Dynamic;
using System.Linq;
#if CustomDLR
using Microsoft.Scripting.Ast;
#else
using System.Linq.Expressions;
#endif
using System.Reflection;

namespace CobaltAHK.ExpressionTree
{
	public class MemberAssignBinder : SetMemberBinder
	{
		public MemberAssignBinder(string member) : base(member, true) { }

		public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
		{
			if (!target.HasValue || !value.HasValue) {
				return Defer(target, value);
			}

			// todo: special properties like base, builtin obj functions etc.
			// todo: .NET types

			return errorSuggestion ?? new DynamicMetaObject(
				ThrowOnFailure(target.Expression, value.Expression),
				BindingRestrictions.GetTypeRestriction(target.Expression, target.LimitType));
		}

		private static Expression ThrowOnFailure(Expression target, Expression value)
		{
			return Expression.Throw(Expression.Constant(""), typeof(InvalidOperationException)); // todo: supply message
		}
	}
}<commit_msg>fix MemberAssignBinder exception code<commit_after>using System;
using System.Dynamic;
using System.Linq;
#if CustomDLR
using Microsoft.Scripting.Ast;
#else
using System.Linq.Expressions;
#endif
using System.Reflection;

namespace CobaltAHK.ExpressionTree
{
	public class MemberAssignBinder : SetMemberBinder
	{
		public MemberAssignBinder(string member) : base(member, true) { }

		public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
		{
			if (!target.HasValue || !value.HasValue) {
				return Defer(target, value);
			}

			// todo: special properties like base, builtin obj functions etc.
			// todo: .NET types

			return errorSuggestion ?? new DynamicMetaObject(
				ThrowOnFailure(target.Expression, value.Expression),
				BindingRestrictions.GetTypeRestriction(target.Expression, target.LimitType));
		}

		private Expression ThrowOnFailure(Expression target, Expression value)
		{
			return Expression.Throw(Expression.New(typeof(InvalidOperationException))); // todo: supply message
		}
	}
}
{'fraction_non_alphanumeric': 0.09002770083102493, 'fraction_numerical': 0.0, 'mean_word_length': 5.33625730994152, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6336650', 'n_tokens_mistral': 669, 'n_tokens_neox': 589, 'n_words': 151}