Error system Harbour Console

Error system Harbour Console

Postby HunterEC » Mon Sep 28, 2015 7:13 am

Guys:

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



Also on this sample error app:
Code: Select all  Expand view
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.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Re: Error system Harbour Console

Postby Antonio Linares » Mon Sep 28, 2015 7:19 am

Gustavo,

harbour.exe /n test.prg > error.log
regards, saludos

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

Re: Error system Harbour Console

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

Re: Error system Harbour Console

Postby Antonio Linares » Tue Sep 29, 2015 7: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: Select all  Expand view
PROCEDURE Main
   ? a
RETURN


Then I get at runtime:
Image
regards, saludos

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

Re: Error system Harbour Console

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

Re: Error system Harbour Console

Postby Antonio Linares » Wed Sep 30, 2015 7:54 am

Try this:

Code: Select all  Expand view

PROCEDURE Main

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

   ? a
RETURN
 
regards, saludos

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

Re: Error system Harbour Console

Postby HunterEC » Wed Sep 30, 2015 10:52 am

Antonio:

Thank you very much ! How could I had missed that ? Hehehe
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 59 guests