OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 '''Exception types for GRIT. | 6 '''Exception types for GRIT. |
7 ''' | 7 ''' |
8 | 8 |
9 class Base(Exception): | 9 class Base(Exception): |
10 '''A base exception that uses the class's docstring in addition to any | 10 '''A base exception that uses the class's docstring in addition to any |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 class DuplicateKey(Parsing): | 61 class DuplicateKey(Parsing): |
62 '''A duplicate key attribute was found.''' | 62 '''A duplicate key attribute was found.''' |
63 pass | 63 pass |
64 | 64 |
65 | 65 |
66 class TooManyExamples(Parsing): | 66 class TooManyExamples(Parsing): |
67 '''Only one <ex> element is allowed for each <ph> element.''' | 67 '''Only one <ex> element is allowed for each <ph> element.''' |
68 pass | 68 pass |
69 | 69 |
70 | 70 |
71 class GotPathExpectedFilenameOnly(Parsing): | |
72 '''The 'filename' attribute of <output> and the 'file' attribute of <part> | |
73 must be bare filenames, not paths. | |
74 ''' | |
75 pass | |
76 | |
77 | |
78 class FileNotFound(Parsing): | 71 class FileNotFound(Parsing): |
79 '''The resource file was not found. | 72 '''The resource file was not found. |
80 ''' | 73 ''' |
81 pass | 74 pass |
82 | 75 |
83 | 76 |
84 class InvalidMessage(Base): | 77 class InvalidMessage(Base): |
85 '''The specified message failed validation.''' | 78 '''The specified message failed validation.''' |
86 pass | 79 pass |
87 | 80 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 125 |
133 | 126 |
134 class IdRangeOverlap(Base): | 127 class IdRangeOverlap(Base): |
135 '''ID range overlap.''' | 128 '''ID range overlap.''' |
136 pass | 129 pass |
137 | 130 |
138 | 131 |
139 class ReservedHeaderCollision(Base): | 132 class ReservedHeaderCollision(Base): |
140 '''Resource included with first 3 bytes matching reserved header.''' | 133 '''Resource included with first 3 bytes matching reserved header.''' |
141 pass | 134 pass |
OLD | NEW |