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 {
9090 #[ pyattr]
9191 pub const DICTFLAG_FINAL : u32 = 0x1000 ;
9292
93- #[ pyattr( once) ]
94- fn error ( vm : & VirtualMachine ) -> PyTypeRef {
93+ #[ pyattr( name = "ArgumentError" , once) ]
94+ fn argument_error ( vm : & VirtualMachine ) -> PyTypeRef {
9595 vm. ctx . new_exception_type (
9696 "_ctypes" ,
9797 "ArgumentError" ,
9898 Some ( vec ! [ vm. ctx. exceptions. exception_type. to_owned( ) ] ) ,
9999 )
100100 }
101101
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+
102111 pub fn get_size ( ty : & str ) -> usize {
103112 match ty {
104113 "u" => mem:: size_of :: < WideChar > ( ) ,
You can’t perform that action at this time.
0 commit comments