Try Catch
Hello,
I have a try catch block that
when the function returns no errors, I want to play a sound (1.wav)
but if it fails I want to play (2.wav)
what is the right way of doing this, or what is a way doing this
Re: Try Catch
"Brian" <bsgallatin [at] community.nospam> wrote in message
news:uTVuRHFnIHA.6064 [at] TK2MSFTNGP03.phx.gbl...
> Hello,
> I have a try catch block that
> when the function returns no errors, I want to play a sound (1.wav)
> but if it fails I want to play (2.wav)
> what is the right way of doing this, or what is a way doing this
>
>
Assuming that by "returns no errors" you mean doesn't throw an exception,
play the success sound from within the try block just after the function
call, and play the failure sound from within the catch block.
Re: Try Catch
Thanks..
"PvdG42" <pvdg [at] toadstool.edu> wrote in message
news:udPHxvKnIHA.5024 [at] TK2MSFTNGP06.phx.gbl...
> "Brian" <bsgallatin [at] community.nospam> wrote in message
> news:uTVuRHFnIHA.6064 [at] TK2MSFTNGP03.phx.gbl...
>> Hello,
>> I have a try catch block that
>> when the function returns no errors, I want to play a sound (1.wav)
>> but if it fails I want to play (2.wav)
>> what is the right way of doing this, or what is a way doing this
>>
>>
>
> Assuming that by "returns no errors" you mean doesn't throw an exception,
> play the success sound from within the try block just after the function
> call, and play the failure sound from within the catch block.
>