Try Catch
am 12.04.2008 06:00:58 von Brian Shafer
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
am 12.04.2008 16:46:00 von pvdg42
"Brian" wrote in message
news:uTVuRHFnIHA.6064@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
am 12.04.2008 19:48:02 von Brian Shafer
Thanks..
"PvdG42" wrote in message
news:udPHxvKnIHA.5024@TK2MSFTNGP06.phx.gbl...
> "Brian" wrote in message
> news:uTVuRHFnIHA.6064@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.
>