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

Unified Diff: pkg/json_rpc_2/lib/error_code.dart

Issue 812253002: Delete a bunch of packages that are now on GitHub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Un-delete http Created 6 years 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
« no previous file with comments | « pkg/json_rpc_2/README.md ('k') | pkg/json_rpc_2/lib/json_rpc_2.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/json_rpc_2/lib/error_code.dart
diff --git a/pkg/json_rpc_2/lib/error_code.dart b/pkg/json_rpc_2/lib/error_code.dart
deleted file mode 100644
index 14b77f2e09b2feb83dac3334ad69a574cd8ed034..0000000000000000000000000000000000000000
--- a/pkg/json_rpc_2/lib/error_code.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Error codes defined in the [JSON-RPC 2.0 specificiation][spec].
-///
-/// These codes are generally used for protocol-level communication. Most of
-/// them shouldn't be used by the application. Those that should have
-/// convenience constructors in [RpcException].
-///
-/// [spec]: http://www.jsonrpc.org/specification#error_object
-library json_rpc_2.error_code;
-
-/// An error code indicating that invalid JSON was received by the server.
-const PARSE_ERROR = -32700;
-
-/// An error code indicating that the request JSON was invalid according to the
-/// JSON-RPC 2.0 spec.
-const INVALID_REQUEST = -32600;
-
-/// An error code indicating that the requested method does not exist or is
-/// unavailable.
-const METHOD_NOT_FOUND = -32601;
-
-/// An error code indicating that the request parameters are invalid for the
-/// requested method.
-const INVALID_PARAMS = -32602;
-
-/// An internal JSON-RPC error.
-const INTERNAL_ERROR = -32603;
-
-/// An unexpected error occurred on the server.
-///
-/// The spec reserves the range from -32000 to -32099 for implementation-defined
-/// server exceptions, but for now we only use one of those values.
-const SERVER_ERROR = -32000;
-
-/// Returns a human-readable name for [errorCode] if it's one specified by the
-/// JSON-RPC 2.0 spec.
-///
-/// If [errorCode] isn't defined in the JSON-RPC 2.0 spec, returns null.
-String name(int errorCode) {
- switch (errorCode) {
- case PARSE_ERROR: return "parse error";
- case INVALID_REQUEST: return "invalid request";
- case METHOD_NOT_FOUND: return "method not found";
- case INVALID_PARAMS: return "invalid parameters";
- case INTERNAL_ERROR: return "internal error";
- default: return null;
- }
-}
« no previous file with comments | « pkg/json_rpc_2/README.md ('k') | pkg/json_rpc_2/lib/json_rpc_2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698