FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error system Harbour Console
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Error system Harbour Console
Posted: Mon Sep 28, 2015 07:13 AM
Guys:

When compiling a Harbour CONSOLE app, the compiler flags as a syntax error the following statement:
Code (fw): Select all Collapse
SET ERRORLOG TO Test.log



Also on this sample error app:
Code (fw): Select all Collapse
PROCEDURE Main
   ? a
RETURN


The runtime system does not create an error.log. How can I make the runtime create an error log ?


Thank you very much.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error system Harbour Console
Posted: Mon Sep 28, 2015 07:19 AM

Gustavo,

harbour.exe /n test.prg > error.log

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Error system Harbour Console
Posted: Tue Sep 29, 2015 06:44 PM

Antonio:

Thank you for your response. I think I posted my question incorrectly, what I mean is the runtime error system.
On the sample program I posted, variable a is undefined and it will raise an error (Variable does not exist). I cannot make Harbour create an error log file that writes the above mentioned error. Thank you very much my friend !

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error system Harbour Console
Posted: Tue Sep 29, 2015 07:29 PM
Gustavo,

If you go to samples and do:

build.bat gustavo (please notice there is no "h" at the end of build.bat)

where gustavo.prg is:
Code (fw): Select all Collapse
PROCEDURE Main
   ? a
RETURN


Then I get at runtime:
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Error system Harbour Console
Posted: Wed Sep 30, 2015 01:44 AM

Antonio:

I also get the error message on screen, but there's no error.log file written on disk. I'm trying to get it logged on disk. Thank you my friend !

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Error system Harbour Console
Posted: Wed Sep 30, 2015 07:54 AM
Try this:

Code (fw): Select all Collapse
PROCEDURE Main

   ErrorBlock( { | oError | MemoWrit( "error.log", oError:Description ) } )

   ? a
RETURN
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Error system Harbour Console
Posted: Wed Sep 30, 2015 10:52 AM

Antonio:

Thank you very much ! How could I had missed that ? Hehehe

Continue the discussion