| Index: pkg/analysis_server/lib/src/protocol.dart
|
| diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
|
| index 2a6e978d21d5b31fa5989f7a9cdeafd69bf54964..8dc44de2ad3b24e8300661cd6f9d82225702078b 100644
|
| --- a/pkg/analysis_server/lib/src/protocol.dart
|
| +++ b/pkg/analysis_server/lib/src/protocol.dart
|
| @@ -751,6 +751,19 @@ class Response {
|
| error: new RequestError(RequestErrorCode.INVALID_REQUEST, 'Invalid request'));
|
|
|
| /**
|
| + * Initialize a newly created instance to represent the SERVER_ERROR error
|
| + * condition.
|
| + */
|
| + factory Response.serverError(Request request, exception, stackTrace) {
|
| + RequestError error =
|
| + new RequestError(RequestErrorCode.SERVER_ERROR, exception.toString());
|
| + if (stackTrace != null) {
|
| + error.stackTrace = stackTrace.toString();
|
| + }
|
| + return new Response(request.id, error: error);
|
| + }
|
| +
|
| + /**
|
| * Initialize a newly created instance to represent the
|
| * SORT_MEMBERS_INVALID_FILE error condition.
|
| */
|
|
|