(
self,
exc_type: PyObjectRef,
exc_val: OptionalArg,
exc_tb: OptionalArg,
vm: &VirtualMachine,
)
| 177 | |
| 178 | #[pymethod] |
| 179 | fn athrow( |
| 180 | self, |
| 181 | exc_type: PyObjectRef, |
| 182 | exc_val: OptionalArg, |
| 183 | exc_tb: OptionalArg, |
| 184 | vm: &VirtualMachine, |
| 185 | ) -> PyResult<PyAsyncGenAThrow> { |
| 186 | warn_deprecated_throw_signature(&exc_val, &exc_tb, vm)?; |
| 187 | PyAsyncGen::init_hooks(&self, vm)?; |
| 188 | Ok(PyAsyncGenAThrow { |
| 189 | ag: self, |
| 190 | aclose: false, |
| 191 | state: AtomicCell::new(AwaitableState::Init), |
| 192 | value: ( |
| 193 | exc_type, |
| 194 | exc_val.unwrap_or_none(vm), |
| 195 | exc_tb.unwrap_or_none(vm), |
| 196 | ), |
| 197 | }) |
| 198 | } |
| 199 | |
| 200 | #[pymethod] |
| 201 | fn aclose(self, vm: &VirtualMachine) -> PyResult<PyAsyncGenAThrow> { |
nothing calls this directly
no test coverage detected