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

Unified Diff: pkg/appengine/lib/api/errors.dart

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files 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/appengine/codereview.settings ('k') | pkg/appengine/lib/api/logging.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/appengine/lib/api/errors.dart
diff --git a/pkg/appengine/lib/api/errors.dart b/pkg/appengine/lib/api/errors.dart
new file mode 100644
index 0000000000000000000000000000000000000000..10298078c3d0383560079592e185d556ce1cd2da
--- /dev/null
+++ b/pkg/appengine/lib/api/errors.dart
@@ -0,0 +1,44 @@
+// 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.
+
+library appengine.api.errors;
+
+import 'dart:io';
+
+class AppEngineError implements Exception {
+ final String message;
+
+ AppEngineError(this.message);
+
+ String toString() => "AppEngineException: $message";
+}
+
+class NetworkError extends AppEngineError implements IOException {
+ NetworkError(String message) : super(message);
+
+ String toString() => "NetworkError: $message";
+}
+
+class ProtocolError extends AppEngineError implements IOException {
+ static ProtocolError INVALID_RESPONSE = new ProtocolError("Invalid response");
+
+ ProtocolError(String message) : super(message);
+
+ String toString() => "ProtocolError: $message";
+}
+
+class ServiceError extends AppEngineError {
+ final String serviceName;
+
+ ServiceError(String message, {this.serviceName: 'ServiceError'})
+ : super(message);
+
+ String toString() => "$serviceName: $message";
+}
+
+class ApplicationError extends AppEngineError {
+ ApplicationError(String message) : super(message);
+
+ String toString() => "ApplicationError: $message";
+}
« no previous file with comments | « pkg/appengine/codereview.settings ('k') | pkg/appengine/lib/api/logging.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698