public static ExceptionHandlerCollection FromArray(params Boo.Lang.Compiler.Ast.ExceptionHandler[] items) { ExceptionHandlerCollection collection = new ExceptionHandlerCollection(); collection.Extend(items); return(collection); }
void CheckExceptionHandlers(ExceptionHandlerCollection handlers) { for (int i = 1; i < handlers.Count; ++i) { ExceptionHandler handler = handlers[i]; for (int j = i - 1; j >= 0; --j) { ExceptionHandler previous = handlers[j]; IType handlerType = handler.Declaration.Type.Entity as IType; IType previousType = previous.Declaration.Type.Entity as IType; if (null == handlerType || null == previousType) continue; if ((handlerType == previousType && null == previous.FilterCondition) || handlerType.IsSubclassOf(previousType)) { Error(CompilerErrorFactory.ExceptionAlreadyHandled( handler, previous)); break; } } } }
public Boo.Lang.Compiler.Ast.ExceptionHandlerCollection PopRange(int begin) { Boo.Lang.Compiler.Ast.ExceptionHandlerCollection range = new Boo.Lang.Compiler.Ast.ExceptionHandlerCollection(_parent); range.InnerList.Extend(InternalPopRange(begin)); return(range); }