Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Handling routine
Message
 
 
To
03/10/2006 23:35:56
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01159209
Message ID:
01159212
Views:
23
>Dear Experts
>
>For error handling I wrote following procedure in my main prg
>
>ON ERROR DO ERRHAND WITH ;
>	ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
>
>PROCEDURE ERRHAND
>PARAMETER MERROR, Mess, MESS1, MPROG, MLINENO
>MESSAGEBOX('Error number: ' + Ltrim(Str(MERROR)) + Chr(13) + ;
>	'ERROR MESSAGE: ' + Mess + Chr(13) + ;
>	'LINE OF CODE WITH ERROR: ' + MESS1 + Chr(13) + ;
>	'LINE NUMBER OF ERROR: ' + Ltrim(Str(MLINENO)) + Chr(13) + ;
>	'PROGRAM WITH ERROR: ' + MPROG, ;
>	48, _SCREEN.CAPTION)
>
>But when some error occours, a screen appears as
>
>Programm Error
>File "errhand.prg" does not exist.
>
>This dialoge box contains three button: cancel - Ignore - Help
>By pressing Cancel or Ignore button this dialog box appears again and again.
>Then I have to terminate my Exe from Task Manager by pressing ALT+CTRL+Del.
>As a result some dbf got corruption.
>
>What should I do to avoid such situation.

Try to add SET PROCEDURE TO MAIN.prg in your main program.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform