Instantiate an exception with `msg` as the only argument. This function should only be used with builtin exception types; if a user-defined exception type is passed in, it may not be fully initialized; try using [`vm.invoke_exception()`][Self::invoke_exception] or [`exceptions::ExceptionCtor`][crate::exceptions::ExceptionCtor] instead.
(&self, exc_type: PyTypeRef, msg: Wtf8Buf)
| 152 | /// [`vm.invoke_exception()`][Self::invoke_exception] or |
| 153 | /// [`exceptions::ExceptionCtor`][crate::exceptions::ExceptionCtor] instead. |
| 154 | pub fn new_exception_msg(&self, exc_type: PyTypeRef, msg: Wtf8Buf) -> PyBaseExceptionRef { |
| 155 | self.new_exception(exc_type, vec![self.ctx.new_str(msg).into()]) |
| 156 | } |
| 157 | |
| 158 | /// Instantiate an exception with `msg` as the only argument and `dict` for object |
| 159 | /// This function should only be used with builtin exception types; if a user-defined exception |
no test coverage detected