load method

Future<VMBreakpoint> load()
override

Loads a full version of this object.

This will throw a VMSentinelException if this object is no longer available. This will contain VMSentinel.expired if this object was temporary and has expired, and VMSentinel.collected if this was a heap object that has been collected or a non-heap object that has been deleted.

Implementation

Future<VMBreakpoint> load() async {
  try {
    return newVMBreakpoint(_scope, await _scope.loadObject(_id));
  } on rpc.RpcException catch (error) {
    if (error.code != rpc_error.INVALID_PARAMS) rethrow;

    // Work around sdk#24247.
    throw new VMSentinelException(VMSentinel.expired);
  }
}