Announcement

Collapse
No announcement yet.

Try Catch Finally

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    Also is Try/Catch/Finally only valid for errors? (or could it sometimes be used in place of "Select Case" if looking for an error? aka raise an error if value not found, or call the catch case if not found???)
    There is a another current thread on this right now. http://www.powerbasic.com/support/pb...ad.php?t=40027

    However, 'CASE ELSE' would seem a little more straightforward in your particular scenario.

    Leave a comment:


  • Cliff Nichols
    started a topic Try Catch Finally

    Try Catch Finally

    With the advent of PbWin901 today, I thought now is as good a time as ever to try out different programming styles than what I am used to. One concept is Try Catch Finally.

    Since GetLastError <> ERR then I have questions as to how Try Catch Finally would work with calling Windows Api??? (Docs only show use of ERR, so I suspect only PB errors are valid in a Try/Catch/Finally format???)

    Also is Try/Catch/Finally only valid for errors? (or could it sometimes be used in place of "Select Case" if looking for an error? aka raise an error if value not found, or call the catch case if not found???)
Working...
X