File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -90,15 +90,24 @@ pub(crate) mod _ctypes {
90
90
#[ pyattr]
91
91
pub const DICTFLAG_FINAL : u32 = 0x1000 ;
92
92
93
- #[ pyattr( once) ]
94
- fn error ( vm : & VirtualMachine ) -> PyTypeRef {
93
+ #[ pyattr( name = "ArgumentError" , once) ]
94
+ fn argument_error ( vm : & VirtualMachine ) -> PyTypeRef {
95
95
vm. ctx . new_exception_type (
96
96
"_ctypes" ,
97
97
"ArgumentError" ,
98
98
Some ( vec ! [ vm. ctx. exceptions. exception_type. to_owned( ) ] ) ,
99
99
)
100
100
}
101
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
+
102
111
pub fn get_size ( ty : & str ) -> usize {
103
112
match ty {
104
113
"u" => mem:: size_of :: < WideChar > ( ) ,
You can’t perform that action at this time.
0 commit comments