Another newbie question. I want to raise/throw an exception based on conditional logic within a sub and exit the application. How do I do this? Seems simple but I can't seem to find any examples that show how to do this. Do I use try, catch, throw? If so, how do I define and catch a user-defined exception? Also, once thrown in the sub, how to I continue to propogate it in the main?
Here is some pcode:
[tt]
Sub Main()
call MySub
<only do stuff if no exception was thrown in MySub>
End Sub
Sub MySub()
<stuff>
if myValue = <some error condition> then
<raise an error and exit the application>
end if
<do more stuff>
End Sub
[/tt]
Thanks,
Greg
Here is some pcode:
[tt]
Sub Main()
call MySub
<only do stuff if no exception was thrown in MySub>
End Sub
Sub MySub()
<stuff>
if myValue = <some error condition> then
<raise an error and exit the application>
end if
<do more stuff>
End Sub
[/tt]
Thanks,
Greg