Skip to content

Commit

Permalink
Added exception about NAudio files not existing to help improve error…
Browse files Browse the repository at this point in the history
… reporting
  • Loading branch information
vchelaru committed Dec 16, 2023
1 parent e9c66c6 commit 7e55e82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions FRBDK/Glue/NAudioPlugin/Embedded/NAudio_Song.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ public NAudio_Song(string fileName)
var extension = FlatRedBall.IO.FileManager.GetExtension(fileName);
if (extension == "mp3")
{
#if DEBUG
if(!System.IO.File.Exists(fileName))
{
throw new FileNotFoundException($"Could not find NAudio song file: {fileName}");
}
#endif
this.reader = new AudioFileReader(fileName);
loopStream = new LoopStream(reader);
}
Expand Down

0 comments on commit 7e55e82

Please sign in to comment.