Skip to content

Commit

Permalink
Remove usage of "throw errors" in Erizo (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcague authored Nov 21, 2017
1 parent 15cc8ef commit 7dc4db2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
8 changes: 0 additions & 8 deletions erizo/src/erizo/pipeline/Pipeline-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ PipelineBase& PipelineBase::removeHelper(H* handler, bool checkEqual) {
}
}

if (!removed) {
throw std::invalid_argument("No such handler in pipeline");
}

return *this;
}

Expand Down Expand Up @@ -189,10 +185,6 @@ void PipelineBase::removeService() {
}
}
}

if (!removed) {
throw std::invalid_argument("No such handler in pipeline");
}
}


Expand Down
4 changes: 2 additions & 2 deletions erizo/src/erizo/pipeline/Pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ PipelineBase::ContextIterator PipelineBase::removeAt(

PipelineBase& PipelineBase::removeFront() {
if (ctxs_.empty()) {
throw std::invalid_argument("No handlers in pipeline");
return *this;
}
removeAt(ctxs_.begin());
return *this;
}

PipelineBase& PipelineBase::removeBack() {
if (ctxs_.empty()) {
throw std::invalid_argument("No handlers in pipeline");
return *this;
}
removeAt(--ctxs_.end());
return *this;
Expand Down
2 changes: 1 addition & 1 deletion erizo/src/erizo/thread/Scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void Scheduler::serviceQueue() {
lock.lock();
} catch (...) {
--n_threads_servicing_queue_;
throw;
assert(false && "An exception has been thrown inside Scheduler");
}
}
--n_threads_servicing_queue_;
Expand Down

0 comments on commit 7dc4db2

Please sign in to comment.