Errorsys

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 547
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 68 times
Been thanked: 121 times

Errorsys

Post by AUGE_OHR » Thu Feb 13, 2020 12:07 am

hi,

if you have not a own Errorsys HMG will use c:\hmg.3.4.4\SOURCE\ErrorSys.prg

Code: Select all

   // add either filename or operation
   DO CASE
   CASE !Empty( oError:filename )
      cMessage += ": " + oError:filename
   CASE !Empty( oError:operation )
      cMessage += ": " + oError:operation
   ENDCASE
that´s why i talk about "missing" in Errorlog

so i have change it to

Code: Select all

   IF !Empty( oError:filename )
      cMessage += ": " + oError:filename
   ENDIF
   IF !Empty( oError:operation )
      cMessage += ": " + oError:operation
   ENDIF
and add "as much as possible Information"into Errorlog

but what i´m looking for are oError:Args

Xbase++

Code: Select all

   IF VALTYPE( oError::Args ) == "A"
      AEVAL( oError:Args, ;
             { | x, y | QOUT( SPACE( 9 ), "-> VALTYPE:", y := VALTYPE( x ) ), ;
             IIF( y == "O", QQOUT( " CLASS:", x:className() ), ;
             QQOUT( " VALUE:", Var2Char( x ) ) ) } )
  ENDIF              
FiveWin

Code: Select all

        if ValType( e:Args ) == "A"
            cErrorLog += "   Parameter   :" + CRLF
            for n = 1 to Len( e:Args )
                cErrorLog += "     [" + Str( n, 4 ) + "] = " + ValType( e:Args[ n ] ) + ;
                             "   " + cValToChar( e:Args[ n ] ) + CRLF
            next
        endif
so how with HMG and MiniGUI :idea:
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 547
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 68 times
Been thanked: 121 times

Post by AUGE_OHR » Thu Feb 13, 2020 1:24 am

hi,

have test it :D
Error_Args.jpg
Error_Args.jpg (57.88 KiB) Viewed 102 times
it simple give me more Information from Error-Object

Code: Select all

   // add oError:Args
   if ValType( oError:Args ) == "A"              // Jimmy
       cMessage += "   Parameter   :" + CRLF
       FOR n = 1 to Len( oError:Args )
           cMessage += "     [" + Str( n, 4 ) + "] = " + ValType( oError:Args[ n ] ) + ;
                        "   " + hb_valToExp( oError:Args[ n ] ) + CRLF
       NEXT
   ENDIF
you can attach ERRORSYS.PRG in your *.HBP or replace Original c:\hmg.3.4.4\SOURCE\ErrorSys.PRG (re-build LIB)
Attachments
HB_ERRORSYS.ZIP
(2.96 KiB) Downloaded 14 times
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 547
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 68 times
Been thanked: 121 times

Post by AUGE_OHR » Thu Feb 13, 2020 9:59 am

hi,

it seems to work stable with new Errorsys but i have to re-compile Debugger with new Errorsys else it does not start ...

the Function hb_valToExp() is working fine but when have a big Array it might exceed Screen hight ...
so we need a Version which limit "Array -Dump" ... perhaps only 1st Element :idea:

---

this is a "General" Version but my "own" Version will have "more" Information.
what do you think to include to help find Error with Errorlog :idea:
have fun
Jimmy

Post Reply