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/interpreter.cpp

    r2935 r3009  
    112112Completion Interpreter::evaluate(const UString &code, const Value &thisV)
    113113{
    114   return rep->evaluate(code,thisV);
     114  Completion comp = rep->evaluate(code,thisV);
     115#if !NDEBUG
     116  if (comp.complType() == Throw) {
     117    lock();
     118    ExecState *exec = rep->globalExec();
     119    printf("Uncaught exception: %s\n", comp.value().toObject(exec).toString(exec).ascii());
     120    unlock();
     121  }
     122#endif
     123  return comp;
    115124}
    116125
Note: See TracChangeset for help on using the changeset viewer.