From 90b785c88cab563238ce99a0500a9f6371e7fe4e Mon Sep 17 00:00:00 2001 From: "scheglov@google.com" Date: Fri, 31 Oct 2014 20:43:28 +0000 Subject: [PATCH] Fix for an error in the error handler. We pass exception as String message. We would have caught it if we had run the server in the checked mode. Instead it failed at the JSON serialization stage. R=brianwilkerson@google.com BUG= Review URL: https://codereview.chromium.org//698563003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41450 260f80e4-7a28-3924-810f-c04153c831b5 --- pkg/analysis_server/lib/src/analysis_server.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart index 2ad03fdf3bd..7abc951841b 100644 --- a/pkg/analysis_server/lib/src/analysis_server.dart +++ b/pkg/analysis_server/lib/src/analysis_server.dart @@ -435,8 +435,9 @@ class AnalysisServer { channel.sendResponse(exception.response); return; } catch (exception, stackTrace) { - RequestError error = - new RequestError(RequestErrorCode.SERVER_ERROR, exception); + RequestError error = new RequestError( + RequestErrorCode.SERVER_ERROR, + exception.toString()); if (stackTrace != null) { error.stackTrace = stackTrace.toString(); }