MsgHMGError

Moderator: Rathinagiri

Post Reply
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MsgHMGError

Post by Pablo César »

There is a function MsgHMGError which allows to write in ErrorLog.Htm file.

This function is usefull when we wish to write runtime errors at log file and it makes use of Html_ functions which are also usefull. These Html_ functions are placed at ..\SOURCE\ErrorSys.prg but there is missing a very important function: HTML_END which must end the html file appropriately and also close the file handle (in this case: ErrorLog.Htm file). When this file is created, this file will keep the file still open and do not allow to access it, until the application is closed.

For the proper functioning of these functions in HTML, is important to include this function:

Function HTML_END(nFHandle)
   FWriteLine( nFHandle, "</table></body></html>" )
   FClose( nFHandle )
Return Nil


Rathi + Claudio, recently in my last update in HMG_HPDF.Prg I had included this function but with missing FClose(HTMARCH) (here were for download) . Please, make it sure to correct and delivered for next HMG upgrade.

These HMTL functions It was created at HMG_HPDF to make TABLEs and I think all these HMTL functions (including at ErrorSys.prg) would be located in separated file. In order to growing up with separated lib in hfcl. What do you think ?

Please, confirm your decision.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: MsgHMGError

Post by Rathinagiri »

Sure Pablo. Thank you.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

MsgHMGError

Post by Pablo César »

Rathinagiri wrote:Sure Pablo. Thank you.
Sorry Rathi, seems repetitive my question, but is to make sure what we need to do for next release. So, please add this at EOF of ..\SOURCE\ErrorSys.prg:

Code: Select all

*-----------------------------------------------------------------------------*
* Pablo César on May 5th, 2014
*-----------------------------------------------------------------------------*
FUNCTION HTML_END( HTMARCH )
If HTMARCH > 0
   FWrite( HTMARCH, "</BODY></HTML>" )
   FClose( HTMARCH )
Endif
Return Nil
Then Exclude this same name of function in ..\hfcl\Source\HMG_HPDF.Prg

When you decide to unify HMTL functions at separated PRG and library, you can extract from HMG_HPDF.Prg too, please.

Would you confirm understanding, please ? Thank you in advanced.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply