(&self, obj: PyObjectRef, name: PyStrRef)
| 177 | } |
| 178 | |
| 179 | pub fn new_no_attribute_error(&self, obj: PyObjectRef, name: PyStrRef) -> PyBaseExceptionRef { |
| 180 | let msg = format!( |
| 181 | "'{}' object has no attribute '{}'", |
| 182 | obj.class().name(), |
| 183 | name |
| 184 | ); |
| 185 | let attribute_error = self.new_attribute_error(msg); |
| 186 | |
| 187 | // Use existing set_attribute_error_context function |
| 188 | self.set_attribute_error_context(&attribute_error, obj, name); |
| 189 | |
| 190 | attribute_error |
| 191 | } |
| 192 | |
| 193 | pub fn new_name_error(&self, msg: impl Into<Wtf8Buf>, name: PyStrRef) -> PyBaseExceptionRef { |
| 194 | let name_error_type = self.ctx.exceptions.name_error.to_owned(); |
no test coverage detected