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

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

Postby HunterEC » Tue Apr 14, 2015 10:10 am

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.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


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

Postby HunterEC » Thu Apr 16, 2015 8: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 !
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

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

Postby hmpaquito » Thu Apr 16, 2015 8:23 am

xhb_ErrorLog( cErrorLog, lErrorLogAppend )
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

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

Postby HunterEC » Thu Apr 16, 2015 8:44 am

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 !
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

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

Postby hmpaquito » Thu Apr 16, 2015 9: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
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

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

Postby Antonio Linares » Fri Apr 17, 2015 2: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: 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41365
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby HunterEC » Fri Apr 17, 2015 5: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: 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 !
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

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

Postby Antonio Linares » Sat Apr 18, 2015 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41365
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby HunterEC » 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: 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 !
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], richard-service and 31 guests