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

Unified Diff: lib/protobuf/plugin/ProtocException.dart

Issue 10595002: Protocol Buffer runtime library and 'protoc' plugin (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Work around http://code.google.com/p/dart/issues/detail?id=3806 Created 8 years, 6 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
« no previous file with comments | « lib/protobuf/plugin/ProtobufField.dart ('k') | lib/protobuf/plugin/ProtocGenDart.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/protobuf/plugin/ProtocException.dart
diff --git a/lib/protobuf/plugin/ProtocException.dart b/lib/protobuf/plugin/ProtocException.dart
new file mode 100644
index 0000000000000000000000000000000000000000..2b514c6a6e19522b63fe6efba007f1a54c00aa8b
--- /dev/null
+++ b/lib/protobuf/plugin/ProtocException.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2011, 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.
+
+class ProtocException {
+ String message;
+
+ ProtocException(this.message) { }
+
+ String toString() => message;
+}
+
+class InvalidDefaultValue extends ProtocException {
+ InvalidDefaultValue(String message) :
+ super("InvalidDefaultValue: $message") { }
+
+ static InvalidDefaultValue invalidDoubleValue(String fieldName,
+ String invalidValue) {
+ return new InvalidDefaultValue(
+ "Protoc found invalid default value ($invalidValue) for the "
+ "'double' field ${fieldName}");
+ }
+}
+
« no previous file with comments | « lib/protobuf/plugin/ProtobufField.dart ('k') | lib/protobuf/plugin/ProtocGenDart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698