From a7870bbdf2e3b30a1578ee32a0f02f01225c6bee Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 7 Oct 2008 12:25:23 +0000 Subject: [PATCH] 2008-10-07 14:24 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * include/hbapierr.h * source/vm/extrap.c * source/rtl/errorint.c ! Fixed recent modification on Windows platform, where GPF would generate an internal error. It didn't launch the OS error handler. ! Fixed hb_errInternal() being marked as HB_EXPORT in the headers only. --- harbour/ChangeLog | 10 ++++++++++ harbour/include/hbapierr.h | 1 + harbour/source/rtl/errorint.c | 7 ++++++- harbour/source/vm/extrap.c | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b2718933f2..0701e9b70e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,16 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-07 14:24 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * include/hbapierr.h + * source/vm/extrap.c + * source/rtl/errorint.c + ! Fixed recent modification on Windows platform, where + GPF would generate an internal error. + It didn't launch the OS error handler. + ! Fixed hb_errInternal() being marked as HB_EXPORT + in the headers only. + 2008-10-07 09:33 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * include/hbextern.ch * source/rtl/inkey.c diff --git a/harbour/include/hbapierr.h b/harbour/include/hbapierr.h index 525cade1c0..2c73fb89b9 100644 --- a/harbour/include/hbapierr.h +++ b/harbour/include/hbapierr.h @@ -168,6 +168,7 @@ extern HB_EXPORT USHORT hb_errRT_DBCMD ( ULONG ulGenCode, ULONG ulSubCo extern HB_EXPORT USHORT hb_errRT_DBCMD_Ext ( ULONG ulGenCode, ULONG ulSubCode, const char * szDescription, const char * szOperation, USHORT uiFlags ); extern HB_EXPORT void hb_errInternal ( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 ); +extern void hb_errInternalRaw ( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 ); /* Low-level error handling */ struct HB_ERROR_INFO_; /* forward declaration */ diff --git a/harbour/source/rtl/errorint.c b/harbour/source/rtl/errorint.c index e97fbd400f..00f00718ee 100644 --- a/harbour/source/rtl/errorint.c +++ b/harbour/source/rtl/errorint.c @@ -59,7 +59,7 @@ /* NOTE: Use as minimal calls from here, as possible. Don't allocate memory from this function. [vszakats] */ -void hb_errInternal( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 ) +void hb_errInternalRaw( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 ) { char buffer[ 8192 ]; char file[ _POSIX_PATH_MAX + 1 ]; @@ -138,6 +138,11 @@ void hb_errInternal( ULONG ulIntCode, const char * szText, const char * szPar1, fprintf( hLog, "------------------------------------------------------------------------\n"); fclose( hLog ); } +} + +HB_EXPORT void hb_errInternal( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 ) +{ + hb_errInternalRaw( ulIntCode, szText, szPar1, szPar2 ); /* release console settings */ hb_conRelease(); diff --git a/harbour/source/vm/extrap.c b/harbour/source/vm/extrap.c index eb18c13ef9..e1e17b3acf 100644 --- a/harbour/source/vm/extrap.c +++ b/harbour/source/vm/extrap.c @@ -178,7 +178,7 @@ LONG WINAPI hb_win32ExceptionHandler( struct _EXCEPTION_POINTERS * pExceptionInf } #endif - hb_errInternal( 6005, "Exception error: %s", errmsg, NULL ); + hb_errInternalRaw( 6005, "Exception error: %s", errmsg, NULL ); return hb_cmdargCheck( "BATCH" ) ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH; }