Fix an issue with newlines and exception text in the debugger wire protocol.

Review URL: https://codereview.chromium.org//11645046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16444 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
devoncarew@google.com 2012-12-21 17:27:23 +00:00
parent 33df53e3b1
commit 7695213dcf

View file

@ -126,11 +126,10 @@ static void FormatEncodedString(dart::TextBuffer* buf, Dart_Handle str) {
static void FormatErrorMsg(dart::TextBuffer* buf, Dart_Handle err) {
// TODO(hausner): Turn message into Dart string and
// properly encode the message.
ASSERT(Dart_IsError(err));
const char* msg = Dart_GetError(err);
buf->Printf("\"%s\"", msg);
Dart_Handle str = Dart_NewStringFromCString(msg);
FormatEncodedString(buf, str);
}