FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SET ERRORLOG TO <filename> [ADDITIVE] ...
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
SET ERRORLOG TO <filename> [ADDITIVE] ...
Posted: Tue Apr 14, 2015 10:10 AM
Guys:

Is there a compatible function on Harbour like xharbour's
Code (fw): Select all Collapse
SET ERRORLOG TO <filename> [ADDITIVE]
? Thank you very much.
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: SET ERRORLOG TO &lt;filename&gt; [ADDITIVE] ...
Posted: Tue Apr 14, 2015 12:34 PM
Joรฃo Santos - Sรฃo Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: SET ERRORLOG TO &lt;filename&gt; [ADDITIVE] ...
Posted: Thu Apr 16, 2015 08:13 AM

Karinha:

Thank you for your solution but the problem is that I'm trying to implement this on a console/text app. The FiveWin libs are not available. Any other suggestion ? Thank you my friend. Obrigado !

Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: SET ERRORLOG TO &lt;filename&gt; [ADDITIVE] ...
Posted: Thu Apr 16, 2015 08:23 AM

xhb_ErrorLog( cErrorLog, lErrorLogAppend )

Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: SET ERRORLOG TO &lt;filename&gt; [ADDITIVE] ...
Posted: Thu Apr 16, 2015 08:44 AM
HMPAQUITO:

Thank you for your reply. When I compiled with FW 15.03's BUILDX.BAT the linker pops up:
Code (fw): Select all Collapse
Error: Unresolved external '_HB_FUN_XHB_ERRORLOG' referenced from C:\KEYTEST\KEYTEST.OBJ
* Linking errors *


Any other option ? Thank you very much !
Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: SET ERRORLOG TO &lt;filename&gt; [ADDITIVE] ...
Posted: Thu Apr 16, 2015 09:06 AM
Hi Mel,

> I'm into the compiling phase and found three compiling errors
> between xHarbour and Harbour:
>
> 1. The REGEX command 'LIKE' had to be changed -- did that, works
> now
>
> 2. The command 'SET ERRORLOG TO "c:\myerrorlog.txt" 'command is
> (somehow) wrong ??

Replace with:
xhb_errorlog( "c:\myerrorlog.txt" )

Requires Harbour r16717

> 3. The AT Command (3 args) in xHarbour: nPOS :=
> at("DEF","ABCDEFGHIXYZ",nOLDPOS) is wrong ??

For the rest, add '#include "xhb.ch"' to your sources
and 'xhb.hbc' to your hbmk2 cmdline.

Viktor



From https://groups.google.com/forum/#!msg/h ... HkMZBMTtwJ
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: SET ERRORLOG TO &lt;filename&gt; [ADDITIVE] ...
Posted: Fri Apr 17, 2015 02:01 PM
Gustavo,

HunterEC wrote:HMPAQUITO:

Thank you for your reply. When I compiled with FW 15.03's BUILDX.BAT the linker pops up:
Code (fw): Select all Collapse
Error: Unresolved external '_HB_FUN_XHB_ERRORLOG' referenced from C:\KEYTEST\KEYTEST.OBJ
* Linking errors *


Any other option ? Thank you very much !


You have to link Harbour xhb.lib
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: SET ERRORLOG TO &lt;filename&gt; [ADDITIVE] ...
Posted: Fri Apr 17, 2015 05:17 PM
Antonio:

Thank you for your response. How was your trip ?

It linked but I tested this way (N & O ARE NOT DEFINED):
Code (fw): Select all Collapse
      xhb_errorlog( "TEST.LOG" )
? N + O


It displayed the error but did not created the errorlog file (TEST.LOG).

Two questions on a console mode (text) app:
1. By any chance is there a way to have the same, or almost the same, error log as FW ?
2. How can I open the debugger along the app ?

Thank you very much !
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: SET ERRORLOG TO &lt;filename&gt; [ADDITIVE] ...
Posted: Sat Apr 18, 2015 03:48 PM

Gustavo,

It was good, thanks :-)

You can easily set your error manager this way:

ErrorBlock( { | oError | MyErrorHandler( oError ) } )

function MyErrorHandler( oError ) is a function of your own where you can copy the parts of
FWH c:\fwteam\source\function\errsysw.prg that you want to use

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: SET ERRORLOG TO &lt;filename&gt; [ADDITIVE] ...
Posted: Sat Apr 18, 2015 11:44 PM
Antonio:

Thank you very much. I just dropped the custom ERRORSYS to try harbour's debugger (console mode). I put in this code:
Code (fw): Select all Collapse
ALTD(1)

at the beginning of the first module and I'm getting this error:
Code (fw): Select all Collapse
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ย  Error BASE/1004 ย No exported method: DISPLAY ย  โ”‚
โ”‚ ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย โ”‚
โ”‚ ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  Quit ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜


What I'm missing ?


Thank you very much !

Continue the discussion