throw exception for unknown stream types

This commit is contained in:
badaix 2016-02-09 12:13:00 +01:00
parent 33c9645eef
commit 853693b28b
2 changed files with 18 additions and 6 deletions

View file

@ -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;
}