mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-10 14:51:41 +02:00
throw exception for unknown stream types
This commit is contained in:
parent
33c9645eef
commit
853693b28b
2 changed files with 18 additions and 6 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "pipeReader.h"
|
||||
#include "fileReader.h"
|
||||
#include "common/log.h"
|
||||
#include "common/snapException.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
@ -60,6 +61,10 @@ PcmReader* StreamManager::addStream(const std::string& uri)
|
|||
streams_.push_back(make_shared<FileReader>(pcmListener_, readerUri));
|
||||
return streams_.back().get();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw SnapException("Unknown stream type: " + readerUri.scheme);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue