Lines Matching refs:exception
459 // Capture stack trace for a detailed exception message.
889 Handle<Object> exception;
892 exception = factory()->NewStringFromAsciiChecked(
898 exception = copy;
900 Throw(*exception, nullptr);
908 return heap()->exception();
958 void ReportBootstrappingException(Handle<Object> exception,
960 base::OS::PrintError("Exception thrown during bootstrapping\n");
969 if (exception->IsString() && location->script()->name()->IsString()) {
972 String::cast(*exception)->ToCString().get(),
980 } else if (exception->IsString()) {
982 String::cast(*exception)->ToCString().get());
1013 Object* Isolate::Throw(Object* exception, MessageLocation* location) {
1017 Handle<Object> exception_handle(exception, this);
1019 // Determine whether a message needs to be created for the given exception
1034 // Notify debugger of exception.
1035 if (is_catchable_by_javascript(exception)) {
1056 // For any exception not caught by JavaScript, even when an external
1058 // If the abort-on-uncaught-exception flag is specified, and if the
1059 // embedder didn't specify a custom uncaught exception callback,
1079 // Set the exception being thrown.
1081 return heap()->exception();
1085 Object* Isolate::ReThrow(Object* exception) {
1088 // Set the exception being re-thrown.
1089 set_pending_exception(exception);
1090 return heap()->exception();
1095 Object* exception = pending_exception();
1105 bool catchable_by_js = is_catchable_by_javascript(exception);
1160 // position of the exception handler. The special builtin below will
1211 // Return and clear pending exception.
1213 return exception;
1222 // Search for an exception handler by performing a full walk over the stack.
1242 // The exception has been externally caught if and only if there is an
1273 void Isolate::ScheduleThrow(Object* exception) {
1274 // When scheduling a throw we first throw the exception to get the
1276 Throw(exception);
1309 // Re-throw the exception to avoid getting repeated error reporting.
1378 Handle<Object> exception) {
1379 if (!exception->IsJSObject()) return false;
1383 Handle<JSObject>::cast(exception), start_pos_symbol);
1389 Handle<JSObject>::cast(exception), end_pos_symbol);
1395 Handle<JSObject>::cast(exception), script_symbol);
1405 Handle<Object> exception) {
1406 if (!exception->IsJSObject()) return false;
1409 JSReceiver::GetDataProperty(Handle<JSObject>::cast(exception), key);
1438 Handle<JSMessageObject> Isolate::CreateMessage(Handle<Object> exception,
1442 if (exception->IsJSError()) {
1444 // If the lookup fails, the exception is probably not a valid Error
1448 GetDetailedStackTrace(Handle<JSObject>::cast(exception));
1459 (ComputeLocationFromException(&computed_location, exception) ||
1460 ComputeLocationFromStackTrace(&computed_location, exception) ||
1466 this, MessageTemplate::kUncaughtException, location, exception,
1471 bool Isolate::IsJavaScriptHandlerOnTop(Object* exception) {
1472 DCHECK_NE(heap()->the_hole_value(), exception);
1475 if (!is_catchable_by_javascript(exception)) return false;
1486 // The exception has been externally caught if and only if there is an
1489 // Note, that finally clauses would re-throw an exception unless it's aborted
1496 bool Isolate::IsExternalHandlerOnTop(Object* exception) {
1497 DCHECK_NE(heap()->the_hole_value(), exception);
1505 if (!is_catchable_by_javascript(exception)) return true;
1511 // The exception has been externally caught if and only if there is an
1514 // Note, that finally clauses would re-throw an exception unless it's aborted
1522 Object* exception = pending_exception();
1524 // Try to propagate the exception to an external v8::TryCatch handler. If
1526 // the pending message if the exception is re-thrown.
1534 // For uncatchable exceptions we do nothing. If needed, the exception and the
1536 if (!is_catchable_by_javascript(exception)) return;
1542 if (IsExternalHandlerOnTop(exception)) {
1543 // Only report the exception if the external handler is verbose.
1546 // Report the exception if it isn't caught by JavaScript code.
1547 should_report_exception = !IsJavaScriptHandlerOnTop(exception);
1589 // Do not reschedule the exception if this is the bottom call.
1599 // If the exception is externally caught, clear it if there are no
1611 // Clear the exception if needed.
1618 // Reschedule the exception.
2118 Object* exception = pending_exception();
2120 if (IsJavaScriptHandlerOnTop(exception)) {
2125 if (!IsExternalHandlerOnTop(exception)) {
2131 if (!is_catchable_by_javascript(exception)) {
2852 Handle<Object> exception;