@@ -113,9 +113,6 @@ impl ExceptionZoo {
113
113
114
114
let exception_type = create_type ( "Exception" , & type_type, & base_exception_type, & dict_type) ;
115
115
116
- let runtime_error = create_type ( "RuntimeError" , & type_type, & exception_type, & dict_type) ;
117
- let import_error = create_type ( "ImportError" , & type_type, & exception_type, & dict_type) ;
118
-
119
116
let assertion_error =
120
117
create_type ( "AssertionError" , & type_type, & exception_type, & dict_type) ;
121
118
let attribute_error = create_type (
@@ -124,18 +121,25 @@ impl ExceptionZoo {
124
121
& exception_type. clone ( ) ,
125
122
& dict_type,
126
123
) ;
127
- let file_not_found_error =
128
- create_type ( "FileNotFoundError" , & type_type, & import_error, & dict_type) ;
124
+ let import_error = create_type ( "ImportError" , & type_type, & exception_type, & dict_type) ;
129
125
let index_error = create_type (
130
126
"IndexError" ,
131
127
& type_type,
132
128
& exception_type. clone ( ) ,
133
129
& dict_type,
134
130
) ;
135
131
let key_error = create_type ( "KeyError" , & type_type, & exception_type. clone ( ) , & dict_type) ;
132
+ let name_error = create_type ( "NameError" , & type_type, & exception_type. clone ( ) , & dict_type) ;
133
+ let runtime_error = create_type ( "RuntimeError" , & type_type, & exception_type, & dict_type) ;
134
+ let stop_iteration = create_type ( "StopIteration" , & type_type, & exception_type, & dict_type) ;
135
+ let syntax_error = create_type ( "SyntaxError" , & type_type, & exception_type, & dict_type) ;
136
+ let type_error = create_type ( "TypeError" , & type_type, & exception_type, & dict_type) ;
137
+ let value_error = create_type ( "ValueError" , & type_type, & exception_type, & dict_type) ;
138
+
139
+ let file_not_found_error =
140
+ create_type ( "FileNotFoundError" , & type_type, & import_error, & dict_type) ;
136
141
let module_not_found_error =
137
142
create_type ( "ModuleNotFoundError" , & type_type, & import_error, & dict_type) ;
138
- let name_error = create_type ( "NameError" , & type_type, & exception_type. clone ( ) , & dict_type) ;
139
143
let not_implemented_error = create_type (
140
144
"NotImplementedError" ,
141
145
& type_type,
@@ -144,14 +148,10 @@ impl ExceptionZoo {
144
148
) ;
145
149
let permission_error =
146
150
create_type ( "PermissionError" , & type_type, & import_error, & dict_type) ;
147
- let stop_iteration = create_type ( "StopIteration" , & type_type, & exception_type, & dict_type) ;
148
- let syntax_error = create_type ( "SyntaxError" , & type_type, & exception_type, & dict_type) ;
149
- let type_error = create_type ( "TypeError" , & type_type, & exception_type, & dict_type) ;
150
- let value_error = create_type ( "ValueError" , & type_type, & exception_type, & dict_type) ;
151
151
152
152
ExceptionZoo {
153
- attribute_error : attribute_error,
154
153
assertion_error : assertion_error,
154
+ attribute_error : attribute_error,
155
155
base_exception_type : base_exception_type,
156
156
exception_type : exception_type,
157
157
file_not_found_error : file_not_found_error,
0 commit comments