]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/errors/errors.factor
Report the Win32 error code along with the error message
[factor.git] / basis / windows / errors / errors.factor
old mode 100644 (file)
new mode 100755 (executable)
index c5dedb0..67757d0
@@ -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) ;