Package com.caucho.quercus

Examples of com.caucho.quercus.Location


  /*
   * Throws an error for this uncaught exception.
   */
  private void uncaughtExceptionError(Env env, QuercusLanguageException e)
  {
    Location location = e.getLocation(env);
    String type = e.getValue().getClassName();
    String message = e.getMessage(env);
   
    env.error(location,
              L.l(
View Full Code Here


  }

  public Value execute(Env env)
  {
    // php/0d92
    Location oldLocation = env.setLocation(getLocation());

    // php/1a08
    _expr.evalTop(env);

    env.setLocation(oldLocation);
View Full Code Here

                                  @Optional("0") int code)
  {
    value.putField(env, "message", message);
    value.putField(env, "code", LongValue.create(code));

    Location location = env.getLocation();

    if (location != null) {
      if (location.getFileName() != null)
        value.putField(env, "file", env.createString(location.getFileName()));
      else
        value.putField(env, "file", env.createString("unknown"));

      value.putField(env, "line", LongValue.create(location.getLineNumber()));
    }

    value.putField(env, "trace", ErrorModule.debug_backtrace(env));
    QuercusException e = new QuercusException();
    e.fillInStackTrace();
View Full Code Here

   */
  public Expr createCall(QuercusParser parser,
                         String name,
                         ArrayList<Expr> args)
  {
    Location loc = parser.getLocation();
   
    if ("isset".equals(name) && args.size() == 1)
      return new FunIssetExpr(args.get(0));
    else if ("get_called_class".equals(name) && args.size() == 0)
      return new FunGetCalledClassExpr(loc);
View Full Code Here

    Value line = _value.getField(env, LINE);
   
    if (file.isNull() || line.isNull())
      return Location.UNKNOWN;
    else
      return new Location(file.toString(), line.toInt(), null, null);
  }
View Full Code Here

TOP

Related Classes of com.caucho.quercus.Location

Copyright © 2018 www.massapicom. 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.