Report the Win32 error code along with the error message

release
Doug Coleman 2010-03-31 07:23:19 -05:00
parent 4b1361833e
commit be51468863
1 changed files with 3 additions and 1 deletions

4
basis/windows/errors/errors.factor Normal file → Executable file
View File

@ -719,8 +719,10 @@ ERROR: error-message-failed id ;
: win32-error-string ( -- str )
GetLastError n>win32-error-string ;
ERROR: windows-error n string ;
: (win32-error) ( n -- )
[ win32-error-string throw ] unless-zero ;
[ dup win32-error-string windows-error ] unless-zero ;
: win32-error ( -- )
GetLastError (win32-error) ;