mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Adds error handling for module startup to processing chain and adds file
existance checking for recording files before attempting to create them.
This commit is contained in:
@@ -417,7 +417,14 @@ public class ProcessingChain implements IChannelEventListener
|
||||
/* Start each of the modules */
|
||||
for( Module module: mModules )
|
||||
{
|
||||
module.start();
|
||||
try
|
||||
{
|
||||
module.start();
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
mLog.error( "Error starting module", e );
|
||||
}
|
||||
}
|
||||
|
||||
/* Register with the source to receive sample data. Setup a
|
||||
|
||||
@@ -96,6 +96,16 @@ public class WaveWriter implements AutoCloseable
|
||||
*/
|
||||
private void open() throws IOException
|
||||
{
|
||||
int version = 2;
|
||||
|
||||
while( Files.exists( mFile ) )
|
||||
{
|
||||
mFile = Paths.get( mFile.toFile().getAbsolutePath()
|
||||
.replace( ".wav", "_" + version + ".wav" ) );
|
||||
|
||||
version++;
|
||||
}
|
||||
|
||||
Files.createFile( mFile );
|
||||
|
||||
mFileChannel = (FileChannel.open( mFile, StandardOpenOption.WRITE ) );
|
||||
|
||||
Reference in New Issue
Block a user