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}"); |
+ } |
+} |
+ |