Skip to content

Commit

Permalink
[DAP] Catch any errors for getObject when requesting getters for a class
Browse files Browse the repository at this point in the history
Bug: dart-lang/webdev#2297
Change-Id: Id7234e7dd758e16ea05fb4b4ccab1593f3ca5ea8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342704
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
  • Loading branch information
elliette authored and Commit Queue committed Jan 3, 2024
1 parent 78bab34 commit af8d703
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/dds/lib/src/dap/protocol_converter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,14 @@ class ProtocolConverter {
final getterNames = <String>{};
final service = _adapter.vmService;
while (service != null && classRef != null) {
final classResponse =
await service.getObject(thread.isolate.id!, classRef.id!);
vm.Obj classResponse;
try {
classResponse =
await service.getObject(thread.isolate.id!, classRef.id!);
} catch (e) {
_adapter.logger?.call('Failed to fetch getter for class: $e');
break;
}
if (classResponse is! vm.Class) {
break;
}
Expand Down

0 comments on commit af8d703

Please sign in to comment.