Runtime error - no error line showing

368 views
Skip to first unread message

Zeljko

unread,
Jan 9, 2013, 1:49:32 PM1/9/13
to harbou...@googlegroups.com
When running my apps and a runtime error occurs, nor error lines and no current PROC or FUNCTION name is shown. The hbp file lists as follows:


# $Id: test.hpb $
#
-gtwvt
-Lc:\hb30\lib\win\mingw
C:\hb30\contrib\sddodbc\sddodbc.hbc
-ic:\hb30\include
-lhbwin
-lhblang
-lhbcpage
-lrddcdx
-lunicows
C:\hb30\contrib\hbnetio\hbnetio.hbc
C:\hb30\contrib\sddodbc\sddodbc.hbc
-opk
# debugger
-lhbdebug
-b
-m
PK
XYLIB

What is needed to have the PROC name and errorline to be shown on runtime error crash? Without this, it's really hard to find the error. Even worse, the debugger is not shown on crash even if debug is on.

Mauricio

unread,
Jan 9, 2013, 2:49:50 PM1/9/13
to harbou...@googlegroups.com
same question

Mauricio
MX

Juan Francolino

unread,
Jan 9, 2013, 3:00:14 PM1/9/13
to harbou...@googlegroups.com
Hi,

This problem occurs with -gtwvt parameter.

Working with the following routine which records the sequence error in
the file error.txt:

bErrorBlock:= errorblock({|e| mierror(e, berrorblock)})


/*-------------------------------------------------------*/
FUNCTION MiError( e, bHandler )
Local xRes
Local cMensaje:=""
Local i:=0

cMensaje+= e:description +" - "
cMensaje+= e:operation +" - "

if ( !Empty(e:osCode) )
cMensaje += " (DOS Error " + alltrim(str(e:osCode)) +;
") " +CRLF
end

i := 2
while ( !Empty(ProcName(i)) )
cMensaje+= "Llamado desde:"+ Pad(Trim(ProcName(i)),15) + ;
"(" + str(ProcLine(i),6) + ") " +CRLF
i++
end

memowrit("error.txt",cMensaje)

xRes:=Eval(bHandler,e)


RETURN (xres)
/*------------------------------------------------------------*/

Regards,

Juan

El 09/01/2013 04:49 p.m., Mauricio escribi�:
> same question
>
> Mauricio
> MX
>
>
> El mi�rcoles, 9 de enero de 2013 10:49:32 UTC-8, Zeljko escribi�:
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> Unsubscribe: harbour-user...@googlegroups.com
> Web: http://groups.google.com/group/harbour-users
>
>
>

Mauricio

unread,
Jan 9, 2013, 3:07:33 PM1/9/13
to harbou...@googlegroups.com
Juan:

Gracias, probare  ,

Thanks, Testing

Mauricio Bernal,
Tijuana, Mexico
El 09/01/2013 04:49 p.m., Mauricio escribi�:
> same question
>
> Mauricio
> MX
>
>
> El mi�rcoles, 9 de enero de 2013 10:49:32 UTC-8, Zeljko escribi�:

Zeljko

unread,
Jan 10, 2013, 3:44:30 AM1/10/13
to harbou...@googlegroups.com
Juan, your solution is working for me (with small modifications to suit my needs). Thanks for the tip.
El 09/01/2013 04:49 p.m., Mauricio escribi�:
> same question
>
> Mauricio
> MX
>
>
> El mi�rcoles, 9 de enero de 2013 10:49:32 UTC-8, Zeljko escribi�:
Reply all
Reply to author
Forward
0 new messages