WriteFile is a C function from Windows API.
C language has not a clue about C++ exceptions.