From: Alexander Iljin Date: Tue, 24 May 2016 17:30:02 +0000 (+0300) Subject: windows.errors: make check-invalid-handle throw windows-error instances X-Git-Tag: 0.99~3589 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=77db1b1df38149a34490708ef205b05c3d67e56c 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. --- diff --git a/basis/windows/errors/errors.factor b/basis/windows/errors/errors.factor index 83a8df0148..82e8701d16 100644 --- a/basis/windows/errors/errors.factor +++ b/basis/windows/errors/errors.factor @@ -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 ${