View Single Post
  #2 (permalink)  
Old 05-01-2008, 11:10 PM
Cableguy's Avatar
Cableguy Cableguy is offline
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,345
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Error handling in B4PPC is done using the Errorlabel method...
Taken from the B4PPC Helper:

Quote:
Sets a label that the program will jump to in case an error will occur in the current sub,
Syntax: ErrorLabel (Label)
Example:
Sub OpenFile
ErrorLabel (errHandler)
FileOpen (c,"data.dat",cRead)
Return
ErrHandler:
Msgbox("Can't open file.")
End Sub
Since the Error code or description seem to be "intalation" dependant, (it seems that we need to actually install the errorcode reference file....) there is not currently available way to trap specific errors, but we can do some fancy coding and cascade a series of errorlabels, to try to catch an error at a specific code line or block...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote