Environment versions
Network:
Windows 2008 Server
>>>I'm not aware of any slowdown caused by TRY...ENDTRY that would warrant not to use it when necessary.
>>>
>>
>>Good to know. Maybe I have read about slow TRY/CATCH on the .NET forum. Thank you for your input.
>
>Yeah, you probably heard it from me on the .NET forum, but I should clarify that perception: there is no performance hit at all, unless there's an error that's caught. My point about where to use try/catch is that it shouldn't be used to catch errors that you can test for some other way. Testing for a potential error beats allowing a try to catch the error, performance-wise ... unless it's something that is unlikely to occur.
>
>At least that's the case in .NET ... I can't remember if it's the same in VFP, but I suspect that it is.
>
That's the way I learned it, too -- that the Catch block should be for things the programmer can't control, such as missing files.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only