Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do DeleteFile() Or CopyFile() throw exceptions?

Tags:

c++

file

I use the DeleteFile and CopyFile methods. Do these functions throw exceptions or just set errno and lastError? Do I need to surround this code with try and catch?

like image 495
sofr Avatar asked Jan 29 '26 01:01

sofr


1 Answers

If you're referring to the Win32 API functions, the answer is no. No Win32 functions throw, because it is a C API.

like image 63
i_am_jorf Avatar answered Feb 01 '26 14:02

i_am_jorf



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!