Replace "n>win32-error-string throw" with windows-error instance throwing
parent
e1be081ec9
commit
70d08ce743
|
@ -76,7 +76,7 @@ SYMBOL: master-completion-port
|
||||||
{ [ dup integer? ] [ ] }
|
{ [ dup integer? ] [ ] }
|
||||||
{ [ dup array? ] [
|
{ [ dup array? ] [
|
||||||
first dup eof?
|
first dup eof?
|
||||||
[ drop 0 ] [ n>win32-error-string throw ] if
|
[ drop 0 ] [ throw-windows-error ] if
|
||||||
] }
|
] }
|
||||||
} cond
|
} cond
|
||||||
] with-timeout ;
|
] with-timeout ;
|
||||||
|
@ -147,7 +147,7 @@ M: windows handle-length ( handle -- n/f )
|
||||||
GetLastError {
|
GetLastError {
|
||||||
{ [ dup expected-io-error? ] [ drop f ] }
|
{ [ dup expected-io-error? ] [ drop f ] }
|
||||||
{ [ dup eof? ] [ drop t ] }
|
{ [ dup eof? ] [ drop t ] }
|
||||||
[ n>win32-error-string throw ]
|
[ throw-windows-error ]
|
||||||
} cond
|
} cond
|
||||||
] [ f ] if ;
|
] [ f ] if ;
|
||||||
|
|
||||||
|
|
|
@ -45,11 +45,7 @@ CONSTANT: registry-value-max-length 16384
|
||||||
f 0 KEY_ALL_ACCESS f create-key* drop ;
|
f 0 KEY_ALL_ACCESS f create-key* drop ;
|
||||||
|
|
||||||
: close-key ( hkey -- )
|
: close-key ( hkey -- )
|
||||||
RegCloseKey dup ERROR_SUCCESS = [
|
RegCloseKey n>win32-error-check ;
|
||||||
drop
|
|
||||||
] [
|
|
||||||
n>win32-error-string throw
|
|
||||||
] if ;
|
|
||||||
|
|
||||||
:: with-open-registry-key ( key subkey mode quot -- )
|
:: with-open-registry-key ( key subkey mode quot -- )
|
||||||
key subkey mode open-key :> hkey
|
key subkey mode open-key :> hkey
|
||||||
|
@ -82,7 +78,7 @@ PRIVATE>
|
||||||
key value-name ptr1 lpType buffer
|
key value-name ptr1 lpType buffer
|
||||||
grow-buffer reg-query-value-ex
|
grow-buffer reg-query-value-ex
|
||||||
] [
|
] [
|
||||||
ret n>win32-error-string throw
|
ret throw-windows-error
|
||||||
] if
|
] if
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue