]> gitweb.factorcode.org Git - factor.git/commitdiff
Revert "Replace "n>win32-error-string throw" with windows-error instance throwing"
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 3 Jan 2020 19:03:52 +0000 (13:03 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 3 Jan 2020 19:03:52 +0000 (13:03 -0600)
This reverts commit 70d08ce743d8bae6001f28baf8cc0f13afc93c10.

basis/io/files/windows/windows.factor
basis/windows/registry/registry.factor

index 9b5006701de2d9d9d4aef67e859fbb9dc1a12f61..518fa8daab5c40bc121f4d312281b6f013eae0df 100644 (file)
@@ -76,7 +76,7 @@ SYMBOL: master-completion-port
             { [ dup integer? ] [ ] }
             { [ dup array? ] [
                 first dup eof?
-                [ drop 0 ] [ throw-windows-error ] if
+                [ drop 0 ] [ n>win32-error-string throw ] if
             ] }
         } cond
     ] with-timeout ;
@@ -147,7 +147,7 @@ M: windows handle-length ( handle -- n/f )
         GetLastError {
             { [ dup expected-io-error? ] [ drop f ] }
             { [ dup eof? ] [ drop t ] }
-            [ throw-windows-error ]
+            [ n>win32-error-string throw ]
         } cond
     ] [ f ] if ;
 
index 932e09d823a5ae5d403b369cf8318e5b9401b0c1..be9109827605f58e38fb9b0bb72f8b367a152131 100644 (file)
@@ -45,7 +45,11 @@ CONSTANT: registry-value-max-length 16384
     f 0 KEY_ALL_ACCESS f create-key* drop ;
 
 : close-key ( hkey -- )
-    RegCloseKey n>win32-error-check ;
+    RegCloseKey dup ERROR_SUCCESS = [
+        drop
+    ] [
+        n>win32-error-string throw
+    ] if ;
 
 :: with-open-registry-key ( key subkey mode quot -- )
     key subkey mode open-key :> hkey
@@ -78,7 +82,7 @@ PRIVATE>
             key value-name ptr1 lpType buffer
             grow-buffer reg-query-value-ex
         ] [
-            ret throw-windows-error
+            ret n>win32-error-string throw
         ] if
     ] if ;