windows.errors: make check-invalid-handle throw windows-error instances

There are two consequences:
- the thrown object is now a windows-error, previously it was a string;
- if GetLastError returns zero, nothing is thrown. Previously the string
"The operation completed successfully." was thrown in that case.
flac
Alexander Iljin 2016-05-24 20:30:02 +03:00 committed by Steve Ayerhart
parent bf6c280903
commit e273c77873
No known key found for this signature in database
GPG Key ID: 5BFD39C5359E967D
1 changed files with 1 additions and 1 deletions

View File

@ -744,7 +744,7 @@ ERROR: windows-error n string ;
win32-error-string throw ;
: check-invalid-handle ( handle -- handle )
dup INVALID_HANDLE_VALUE = [ throw-win32-error ] when ;
dup INVALID_HANDLE_VALUE = [ win32-error ] when ;
CONSTANT: expected-io-errors
${