Index: tools/deep_memory_profiler/lib/exceptions.py |
diff --git a/tools/deep_memory_profiler/lib/exceptions.py b/tools/deep_memory_profiler/lib/exceptions.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2c68af72cc2d33450e951df18a645568af431b89 |
--- /dev/null |
+++ b/tools/deep_memory_profiler/lib/exceptions.py |
@@ -0,0 +1,22 @@ |
+# Copyright 2013 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+class EmptyDumpException(Exception): |
+ def __str__(self): |
+ return repr(self.args[0]) |
+ |
+ |
+class ParsingException(Exception): |
+ def __str__(self): |
+ return repr(self.args[0]) |
+ |
+ |
+class InvalidDumpException(ParsingException): |
+ def __str__(self): |
+ return "invalid heap profile dump: %s" % repr(self.args[0]) |
+ |
+ |
+class ObsoleteDumpVersionException(ParsingException): |
+ def __str__(self): |
+ return "obsolete heap profile dump version: %s" % repr(self.args[0]) |