public kOSException(String message, ExecutionContext context) : this(message) { this.LineNumber = context.Line; this.Context = context; this.Program = context.FindClosestParentOfType<ContextRunProgram>(); }
public T FindClosestParentOfType <T>() where T : ExecutionContext { if (this is T) { return((T)this); } else if (ParentContext == null) { return(null); } else { return(ParentContext.FindClosestParentOfType <T>()); } }
public kOSException(String message, ExecutionContext context) : this (message) { this.LineNumber = context.Line; this.Context = context; this.Program = context.FindClosestParentOfType<ContextRunProgram>(); }