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

Side by Side Diff: tools/deep_memory_profiler/lib/exception.py

Issue 19346002: Refactor dmprof: Split dmprof.py into modules. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
M-A Ruel 2013/07/16 13:31:32 Maybe name it exceptions.py ?
Dai Mikurube (NOT FULLTIME) 2013/07/17 05:55:06 Done.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 class EmptyDumpException(Exception):
6 def __init__(self, value=''):
7 super(EmptyDumpException, self).__init__()
M-A Ruel 2013/07/16 13:31:32 Just FYI, you could go simpler with: class EmptyD
Dai Mikurube (NOT FULLTIME) 2013/07/17 05:55:06 Done.
8 self.value = value
9 def __str__(self):
10 return repr(self.value)
11
12
13 class ParsingException(Exception):
14 def __init__(self, value=''):
15 super(ParsingException, self).__init__()
16 self.value = value
17 def __str__(self):
18 return repr(self.value)
19
20
21 class InvalidDumpException(ParsingException):
22 def __init__(self, value):
23 super(InvalidDumpException, self).__init__()
24 self.value = value
25 def __str__(self):
26 return "invalid heap profile dump: %s" % repr(self.value)
27
28
29 class ObsoleteDumpVersionException(ParsingException):
30 def __init__(self, value):
31 super(ObsoleteDumpVersionException, self).__init__()
32 self.value = value
33 def __str__(self):
34 return "obsolete heap profile dump version: %s" % repr(self.value)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698