From: Alexander Iljin Date: Tue, 28 Jun 2016 22:20:38 +0000 (+0300) Subject: Replace "n>win32-error-string throw" with windows-error instance throwing X-Git-Tag: 0.99~3646 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=70d08ce743d8bae6001f28baf8cc0f13afc93c10 Replace "n>win32-error-string throw" with windows-error instance throwing --- diff --git a/basis/io/files/windows/windows.factor b/basis/io/files/windows/windows.factor index 518fa8daab..9b5006701d 100644 --- a/basis/io/files/windows/windows.factor +++ b/basis/io/files/windows/windows.factor @@ -76,7 +76,7 @@ SYMBOL: master-completion-port { [ dup integer? ] [ ] } { [ dup array? ] [ first dup eof? - [ drop 0 ] [ n>win32-error-string throw ] if + [ drop 0 ] [ throw-windows-error ] 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 ] } - [ n>win32-error-string throw ] + [ throw-windows-error ] } cond ] [ f ] if ; diff --git a/basis/windows/registry/registry.factor b/basis/windows/registry/registry.factor index be91098276..932e09d823 100644 --- a/basis/windows/registry/registry.factor +++ b/basis/windows/registry/registry.factor @@ -45,11 +45,7 @@ CONSTANT: registry-value-max-length 16384 f 0 KEY_ALL_ACCESS f create-key* drop ; : close-key ( hkey -- ) - RegCloseKey dup ERROR_SUCCESS = [ - drop - ] [ - n>win32-error-string throw - ] if ; + RegCloseKey n>win32-error-check ; :: with-open-registry-key ( key subkey mode quot -- ) key subkey mode open-key :> hkey @@ -82,7 +78,7 @@ PRIVATE> key value-name ptr1 lpType buffer grow-buffer reg-query-value-ex ] [ - ret n>win32-error-string throw + ret throw-windows-error ] if ] if ;