From 8e526ae4c73aff8ff3eed3b0188ea8b18f9be652 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 22 Jun 2006 17:56:45 +0000 Subject: [PATCH] 2006-06-22 19:43 UTC+0100 Viktor Szakats (viktor.szakats syenar.hu) * harbour/source/rtl/errorsys.prg ! Fixed to use OutErr() instead of QOut() for CA-Cl*pper compatibility. (Thanks Chen) ! Fixed to set ErrorLevel to 1 in case of a RT error. (this was once removed by me as a fix about 7 years ago, but I can't remember what was the reason. It looks to be a wrong fix back then.) * harbour/utils/hbtest/rt_array.prg * Removed one codeblock unused var warning. --- harbour/ChangeLog | 16 ++++++++++++++-- harbour/source/rtl/errorsys.prg | 18 ++++++++++++------ harbour/utils/hbtest/rt_array.prg | 2 +- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 60019cd540..1a777132c5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,9 +8,21 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ + +2006-06-22 21:41 UTC+0100 Viktor Szakats (viktor.szakats syenar.hu) + ! Fixed to use OutErr() instead of QOut() for CA-Cl*pper + * Fix to prev. + + (this was once removed by me as a fix about 7 years ago, + but I can't remember what was the reason. It looks to be + ! Fixed to use OutErr() instead of QOut() for CA-Cl*pper + compatibility. (Thanks Chen) + ! Fixed to set ErrorLevel to 1 in case of a RT error. + (this was once removed by me as a fix about 7 years ago, + but I can't remember what was the reason. It looks to be a wrong fix back then.) - * harbour/makefile.bc - * Updated for latest changes. + + * harbour/utils/hbtest/rt_array.prg * Removed one codeblock unused var warning. 2006-06-22 17:28 UTC+0100 Viktor Szakats (viktor.szakats syenar.hu) diff --git a/harbour/source/rtl/errorsys.prg b/harbour/source/rtl/errorsys.prg index bc5c3a1651..950e449a07 100644 --- a/harbour/source/rtl/errorsys.prg +++ b/harbour/source/rtl/errorsys.prg @@ -138,17 +138,23 @@ STATIC FUNCTION DefError( oError ) cMessage += " " + cDOSError ENDIF - QOut() /// dgh - Temporary to keep DOS prompt from overwriting message. - QOut( cMessage ) + OutErr( hb_OSNewLine() ) + OutErr( cMessage ) + + n := 1 + WHILE ! Empty( ProcName( ++n ) ) + + OutErr( hb_OSNewLine() ) + OutErr( "Called from " + ProcName( n ) + ; + "(" + LTrim( Str( ProcLine( n ) ) ) + ") " ) - n := 2 - WHILE ! Empty( ProcName( n ) ) - QOut("Called from " + ProcName( n ) + ; - "(" + AllTrim( Str( ProcLine( n++ ) ) ) + ")") ENDDO + /// For some strange reason, the DOS prompt gets written on the first line /// *of* the message instead of on the first line *after* the message after /// the program quits, unless the screen has scrolled. - dgh + + ErrorLevel( 1 ) QUIT RETURN .F. diff --git a/harbour/utils/hbtest/rt_array.prg b/harbour/utils/hbtest/rt_array.prg index b8c87248ae..52998b4f61 100644 --- a/harbour/utils/hbtest/rt_array.prg +++ b/harbour/utils/hbtest/rt_array.prg @@ -319,7 +319,7 @@ FUNCTION Main_ARRAY() #endif TEST_LINE( aScan( "A", "A" ) , 0 ) TEST_LINE( aScan( "A", {|| .F. } ) , 0 ) - TEST_LINE( aScan( {1,2,3}, {|x| NIL } ) , 0 ) + TEST_LINE( aScan( {1,2,3}, {|| NIL } ) , 0 ) TEST_LINE( aScan( saAllTypes, scString ) , 1 ) #ifdef __HARBOUR__ TEST_LINE( aScan( @saAllTypes, scString ) , 1 ) /* Bug in CA-Cl*pper, it will return 0 */