Changeset 3009 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp


Ignore:
Timestamp:
Dec 11, 2002, 7:59:24 PM (22 years ago)
Author:
mjs
Message:

Reviewed by Don.

  • Add kjsprint global function in Development build for ease of debugging.
  • Print uncaught JavaScript exceptions to the console in Development.
  • Improve wording of exception error messages.
  • kjs/function.cpp: (GlobalFuncImp::call):
  • kjs/function.h:
  • kjs/internal.cpp: (InterpreterImp::initGlobalObject):
  • kjs/interpreter.cpp: (Interpreter::evaluate):
  • kjs/nodes.cpp: (NewExprNode::evaluate): (FunctionCallNode::evaluate): (RelationalNode::evaluate):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r2974 r3009  
    694694
    695695  if (v.type() != ObjectType) {
    696     return throwError(exec, TypeError, "Expression is no object. Cannot be new'ed");
     696    return throwError(exec, TypeError, "Value used with new is not object.");
    697697  }
    698698
    699699  Object constr = Object(static_cast<ObjectImp*>(v.imp()));
    700700  if (!constr.implementsConstruct()) {
    701     return throwError(exec, TypeError, "Expression is no constructor.");
     701    return throwError(exec, TypeError, "Value asked to construct is not a constructor.");
    702702  }
    703703
     
    743743    printInfo(exec, "WARNING: Failed function call attempt on", v, line);
    744744#endif
    745     return throwError(exec, TypeError, "Expression is no object. Cannot be called.");
     745    return throwError(exec, TypeError, "Value is not object. Cannot be called.");
    746746  }
    747747
     
    752752    printInfo(exec, "Failed function call attempt on", v, line);
    753753#endif
    754     return throwError(exec, TypeError, "Expression does not allow calls.");
     754    return throwError(exec, TypeError, "Object does not allow calls.");
    755755  }
    756756
     
    761761    printInfo(exec, "Exceeded maximum function call depth", v, line);
    762762#endif
    763     return throwError(exec, RangeError, "Exceeded maximum call stack size.");
     763    return throwError(exec, RangeError, "Exceeded maximum function call depth.");
    764764  }
    765765#endif
     
    12301230      if (v2.type() != ObjectType)
    12311231          return throwError(exec,  TypeError,
    1232                              "Shift expression not an object into IN expression." );
     1232                             "Used IN expression with non-object." );
    12331233      Object o2(static_cast<ObjectImp*>(v2.imp()));
    12341234      b = o2.hasProperty(exec, Identifier(v1.toString(exec)));
     
    12361236    if (v2.type() != ObjectType)
    12371237        return throwError(exec,  TypeError,
    1238                            "Called instanceof operator on non-object." );
     1238                           "Used instanceof operator on non-object." );
    12391239
    12401240    Object o2(static_cast<ObjectImp*>(v2.imp()));
Note: See TracChangeset for help on using the changeset viewer.