You've already forked lazarus-ccr
Added Try-Except to Execute in case sound is unplayable
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4566 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -139,7 +139,13 @@ procedure Tplaysound.Execute;
|
||||
begin
|
||||
if not FileExistsUTF8(fPathToSoundFile) then
|
||||
Exit;
|
||||
PlaySound(fPathToSoundFile);
|
||||
Try
|
||||
PlaySound(fPathToSoundFile);
|
||||
Except
|
||||
On E: Exception do
|
||||
E.CreateFmt(C_UnableToPlay +
|
||||
'%s Message:%s', [fPathToSoundFile, E.Message]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure Tplaysound.PlaySound(const szSoundFilename: string);
|
||||
|
Reference in New Issue
Block a user