]> gitweb.factorcode.org Git - factor.git/commitdiff
Report the Win32 error code along with the error message
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 31 Mar 2010 12:23:19 +0000 (07:23 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 31 Mar 2010 20:03:32 +0000 (15:03 -0500)
basis/windows/errors/errors.factor [changed mode: 0644->0755]

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) ;