Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(859)

Unified Diff: pkg/analysis_server/lib/src/protocol.dart

Issue 1044463004: Gracefully degrade if no source for completion (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Gracefully degrade if no source for completion Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 31e52c9c88c9039625bdb27496b9b2527a1c933d..1377bc342513566fb101f0c5d112a40095af81b2 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -826,6 +826,14 @@ class Response {
error: new RequestError(
RequestErrorCode.UNKNOWN_REQUEST, 'Unknown request'));
+ /**
+ * Initialize a newly created instance to represent an error condition caused
+ * by a [request] referencing a source that does not exist.
+ */
+ Response.unknownSource(Request request) : this(request.id,
+ error: new RequestError(
+ RequestErrorCode.UNKNOWN_SOURCE, 'Unknown source'));
+
Response.unsupportedFeature(String requestId, String message) : this(
requestId,
error: new RequestError(

Powered by Google App Engine
This is Rietveld 408576698