]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/errors/errors.factor
Revert "Delete throw-win32-error, replace with win32-error calls"
[factor.git] / basis / windows / errors / errors.factor
index 5679a62ebad98ec724c8a37817b7b6646292315f..82e8701d16f0fe231dd7ba319f4d99f79a938e88 100644 (file)
@@ -740,6 +740,9 @@ ERROR: windows-error n string ;
         dup n>win32-error-string windows-error
     ] if ;
 
+: throw-win32-error ( -- * )
+    win32-error-string throw ;
+
 : check-invalid-handle ( handle -- handle )
     dup INVALID_HANDLE_VALUE = [ win32-error ] when ;
 
@@ -755,7 +758,11 @@ CONSTANT: expected-io-errors
     expected-io-errors member? ;
 
 : expected-io-error ( error-code -- )
-    expected-io-error? [ win32-error ] unless ;
+    dup expected-io-error? [
+        drop
+    ] [
+        throw-win32-error
+    ] if ;
 
 : io-error ( return-value -- )
     { 0 f } member? [ GetLastError expected-io-error ] when ;