public override void Emit(IMemberEmitter member, ILGenerator gen)
		{
			var ci = exceptionType.GetConstructor(new[] { typeof(String) });
			var constRef = new ConstReference(errorMessage);

			var creationStmt = new NewInstanceExpression(ci, constRef.ToExpression());

			creationStmt.Emit(member, gen);

			gen.Emit(OpCodes.Throw);
		}
Beispiel #2
0
        public override void Emit(IMemberEmitter member, ILGenerator gen)
        {
            var ci       = exceptionType.GetConstructor(new[] { typeof(String) });
            var constRef = new ConstReference(errorMessage);

            var creationStmt = new NewInstanceExpression(ci, constRef.ToExpression());

            creationStmt.Emit(member, gen);

            gen.Emit(OpCodes.Throw);
        }