public override void VisitRaise(RaiseStatement raise) { raise.Value.Accept(this); if (raise.Value.NodeType == typeManager.StrType) { Type etype = typeof(Exception); ConstructorInfo constructor = etype.GetConstructor(new Type[] { typeof(string) }); ilGenerator.Emit(OpCodes.Newobj, constructor); } ilGenerator.Emit(OpCodes.Throw); }
public override void VisitRaise(RaiseStatement raise) { raise.Value.Accept(this); if (raise.Value.NodeType != typeManager.StrType && !raise.Value.NodeType.IsSubtypeOf(typeManager.ExceptionType)) { report.Error(raise.Location, "exception expected"); } }
public virtual void VisitRaise(RaiseStatement raise) { }