void RocketServerFrameContext::sendError(RocketException&& rex) {
  DCHECK(connection_);

  Serializer writer;
  ErrorFrame(streamId_, std::move(rex)).serialize(writer);
  connection_->send(std::move(writer).move());
}
Esempio n. 2
0
Diagnostics::ArgStream Diagnostics::pushErrorFrame(const SourceRange &Range,
                                                   ErrorType Error) {
  Frames.insert(Frames.begin(), ErrorFrame());
  ErrorFrame &Last = Frames.front();
  Last.Range = Range;
  Last.Type = Error;
  ArgStream Out = { &Last.Args };
  return Out;
}