View Single Post
  #3 (permalink)  
Old 05-02-2008, 08:56 AM
agraham's Avatar
agraham agraham is offline
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,773
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by TWELVE View Post
Why do B4P functions or routines not give back a return code of true or false..?
This is a deliberarate design feature of the CLR. Errors are handled by throwing exceptions and catching them by error-handling code, similar to C++. Every B4PPC Sub actually has an exception handler, it is this which puts up the message box when an error occurs. Using Errorlabel replaces this default handler with your own code. Unfortunately, at the moment, there is no way to detect which exception has occurred.

Recently I made a suggestion to Erel about this and he has agreed to put a facility in the next release of B4PPC which will provide low-level access to the exception details. In anticipation I have the library and help file/tutorial ready.
Reply With Quote