View Single Post
  #1 (permalink)  
Old 05-01-2008, 10:52 PM
TWELVE TWELVE is offline
Knows the basics
 
Join Date: Apr 2008
Location: Duesseldorf, Germany
Posts: 71
Default Error handling in Basic4PPC

Hello,

i want prevent users from getting error message boxes, that contain cryptic error messages or even such with no error description.Therefore i tried a bit with the B4P error handler.This is working, if it's been triggered i still do not know what the exact error was and therefore cannot take the appropriate measure to continue.All i then can assume is: in this sub an error has occured.

Question: is there a chance to get the error description the error popup is presenting to the user..? if not, how do you handle errors in your code and how do you catch them..?

In certain other dialects i used to use a structure like this:

if function(arguments)
...
do something that depends on function
...
Else
...
do some corrective code here
MsgBox("file cannot be opened !")
end if

Why do B4P functions or routines not give back a return code of true or false..? Or do they..? My own created do and can be handled like outlined, by use of the Return directive.

Any other ways or suggestion how to handle that effectively..?



kind regards

TWELVE
Reply With Quote