How do we manage Errros ?

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

How do we manage Errros ?

Post by octal » Wed Jan 17, 2007 10:56 am

How can we Trap Errors ?
- is there any On Error Goto/Gosub ???
- or any Try/Catch construct ?


Best regards

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Wed Jan 17, 2007 11:06 am

If you mean errors like division by zero, this would require a significant code overhead. Probably quite easy if using an interpreted BASIC, but not one that is acceptable for a compiled language like Swordfish.

User avatar
octal
Registered User
Registered User
Posts: 586
Joined: Thu Jan 11, 2007 12:49 pm
Location: Paris IDF
Contact:

Post by octal » Wed Jan 17, 2007 11:18 am

i was thinking about that. I know that need a lot of overhead. The best solution, I think is the check raanges and params in every routine ... But it would be nice to have such tools (like range checking) for debug for example (like the code inserted when we use ICD) and to remove it in release version. I think it would be a good tool if combined with ICD.

Best regards

Post Reply