Page 1 of 1

SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Tue Apr 14, 2015 10:10 am
by HunterEC
Guys:

Is there a compatible function on Harbour like xharbour's
Code: Select all  Expand view
SET ERRORLOG TO <filename> [ADDITIVE]
? Thank you very much.

Re: SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Tue Apr 14, 2015 12:34 pm
by karinha

Re: SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Thu Apr 16, 2015 8:13 am
by HunterEC
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 !

Re: SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Thu Apr 16, 2015 8:23 am
by hmpaquito
xhb_ErrorLog( cErrorLog, lErrorLogAppend )

Re: SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Thu Apr 16, 2015 8:44 am
by HunterEC
HMPAQUITO:

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


Any other option ? Thank you very much !

Re: SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Thu Apr 16, 2015 9:06 am
by hmpaquito
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

Re: SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Fri Apr 17, 2015 2:01 pm
by Antonio Linares
Gustavo,

HunterEC wrote:HMPAQUITO:

Thank you for your reply. When I compiled with FW 15.03's BUILDX.BAT the linker pops up:
Code: Select all  Expand view
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

Re: SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Fri Apr 17, 2015 5:17 pm
by HunterEC
Antonio:

Thank you for your response. How was your trip ?

It linked but I tested this way (N & O ARE NOT DEFINED):
Code: Select all  Expand view
     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 !

Re: SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Sat Apr 18, 2015 3:48 pm
by Antonio Linares
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

Re: SET ERRORLOG TO <filename> [ADDITIVE] ...

PostPosted: Sat Apr 18, 2015 11:44 pm
by HunterEC
Antonio:

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

at the beginning of the first module and I'm getting this error:
Code: Select all  Expand view
┌──────────────────────────────────────────────────┐
│   Error BASE/1004  No exported method: DISPLAY   │
│                                                  │
│                       Quit                       │
└──────────────────────────────────────────────────┘


What I'm missing ?


Thank you very much !