Examples of OutOfScopeException


Examples of com.google.inject.OutOfScopeException


    private Context getContext() {
        Context context = localContext.get();
        if (context == null) {
            throw new OutOfScopeException("Cannot access scoped object. Either we"
                    + " are not currently inside an HTTP Servlet currentRequest, or you may"
                    + " have forgotten to apply " + DefaultArgoDispatcher.class.getName()
                    + " as a servlet filter for this currentRequest.");
        }
        return context;
View Full Code Here

Examples of com.google.inject.OutOfScopeException

            public T get()
            {
                LinkedList<ScopeState> stack = values.get();
                if ( stack == null || stack.isEmpty() )
                {
                    throw new OutOfScopeException( "Cannot access " + key + " outside of a scoping block" );
                }

                ScopeState state = stack.getFirst();

                Provider<?> seeded = state.seeded.get( key );
View Full Code Here

Examples of org.jboss.errai.codegen.exception.OutOfScopeException

      else {
        if (context.isPermissiveMode()) {
          return v.getReference();
        }
        else {
          throw new OutOfScopeException("variable cannot be referenced from this scope: " + v.getName());
        }
      }
    }
    else if (o instanceof Statement) {
      ((Statement) o).generate(context);
View Full Code Here

Examples of org.jboss.errai.codegen.exception.OutOfScopeException

    if (found == null) {
      if (GenUtil.isPermissiveMode()) {
        return Variable.create(name, Object.class).getReference();
      }
      else {
        throw new OutOfScopeException((mustBeClassMember) ? "this." + name : name + " not found.\nScope:\n" + this);
      }
    }

    return found.getReference();
  }
View Full Code Here

Examples of org.jboss.errai.codegen.exception.OutOfScopeException

      }
    }
    while (found == null && (ctx = ctx.parent) != null);

    if (found == null)
      throw new OutOfScopeException("Label not found: " + name);

    return found.getReference();
  }
View Full Code Here

Examples of org.jboss.errai.codegen.exception.OutOfScopeException

      else {
        if (isPermissiveMode()) {
          return v.getReference();
        }
        else {
          throw new OutOfScopeException("variable cannot be referenced from this scope: " + v.getName());
        }
      }
    }
    else if (o instanceof Statement) {
      ((Statement) o).generate(context);
View Full Code Here

Examples of org.jboss.errai.codegen.exception.OutOfScopeException

      missingSymbols.add(name);
      if (GenUtil.isPermissiveMode()) {
        return Variable.create(name, Object.class).getReference();
      }
      else {
        throw new OutOfScopeException((mustBeClassMember) ? "this." + name : name + " not found.\nScope:\n" + this);
      }
    }

    return found.getReference();
  }
View Full Code Here

Examples of org.jboss.errai.codegen.exception.OutOfScopeException

      }
    }
    while (found == null && (ctx = ctx.parent) != null);

    if (found == null) {
      throw new OutOfScopeException("Label not found: " + name);
    }

    return found.getReference();
  }
View Full Code Here

Examples of org.jboss.errai.codegen.exception.OutOfScopeException

      else {
        if (context.isPermissiveMode()) {
          return v.getReference();
        }
        else {
          throw new OutOfScopeException("variable cannot be referenced from this scope: " + v.getName());
        }
      }
    }
    else if (o instanceof Statement) {
      ((Statement) o).generate(context);
View Full Code Here

Examples of org.jboss.errai.codegen.exception.OutOfScopeException

            if (generatedCache != null) return generatedCache;

            final VariableReference var = context.getVariable(name);

            if (var == null) {
              throw new OutOfScopeException("could not access variable: " + name);
            }

            type = var.getType();

            return generatedCache = name;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.