Changeset 4363 in webkit for trunk/JavaScriptCore/kjs/interpreter.cpp
- Timestamp:
- May 13, 2003, 2:19:57 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/interpreter.cpp
r4087 r4363 116 116 } 117 117 118 Completion Interpreter::evaluate(const UString &code, const Value &thisV )118 Completion Interpreter::evaluate(const UString &code, const Value &thisV, const UString &filename) 119 119 { 120 120 Completion comp = rep->evaluate(code,thisV); 121 #ifndef NDEBUG 122 if (comp.complType() == Throw) { 121 122 #if APPLE_CHANGES 123 if (shouldPrintExceptions() && comp.complType() == Throw) { 123 124 lock(); 124 125 ExecState *exec = rep->globalExec(); 125 printf("Uncaught exception: %s\n", comp.value().toObject(exec).toString(exec).ascii()); 126 char *f = strdup(filename.ascii()); 127 const char *message = comp.value().toObject(exec).toString(exec).ascii(); 128 printf("%s:%s\n", f, message); 129 free(f); 126 130 unlock(); 127 131 } 128 132 #endif 133 129 134 return comp; 130 135 } … … 313 318 #endif 314 319 320 #if APPLE_CHANGES 321 static bool printExceptions = false; 322 323 bool Interpreter::shouldPrintExceptions() 324 { 325 return printExceptions; 326 } 327 328 void Interpreter::setShouldPrintExceptions(bool print) 329 { 330 printExceptions = print; 331 } 332 #endif 333 315 334 void Interpreter::virtual_hook( int, void* ) 316 335 { /*BASE::virtual_hook( id, data );*/ }
Note:
See TracChangeset
for help on using the changeset viewer.