8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 429754f commit 7fada8bCopy full SHA for 7fada8b
vm/src/stdlib/ctypes.rs
@@ -90,15 +90,24 @@ pub(crate) mod _ctypes {
90
#[pyattr]
91
pub const DICTFLAG_FINAL: u32 = 0x1000;
92
93
- #[pyattr(once)]
94
- fn error(vm: &VirtualMachine) -> PyTypeRef {
+ #[pyattr(name = "ArgumentError", once)]
+ fn argument_error(vm: &VirtualMachine) -> PyTypeRef {
95
vm.ctx.new_exception_type(
96
"_ctypes",
97
"ArgumentError",
98
Some(vec![vm.ctx.exceptions.exception_type.to_owned()]),
99
)
100
}
101
102
+ #[pyattr(name = "FormatError", once)]
103
+ fn format_error(vm: &VirtualMachine) -> PyTypeRef {
104
+ vm.ctx.new_exception_type(
105
+ "_ctypes",
106
+ "FormatError",
107
+ Some(vec![vm.ctx.exceptions.exception_type.to_owned()]),
108
+ )
109
+ }
110
+
111
pub fn get_size(ty: &str) -> usize {
112
match ty {
113
"u" => mem::size_of::<WideChar>(),
0 commit comments