News for hackers. Stuff that matters.
Re:Nanomsg postmortem and other stories by hendzen on Monday February 08, 2016 @09:40AM (#11058292)
Your connect method can still throw std::bad_alloc.
Re:Nanomsg postmortem and other stories by IshKebab on Friday February 12, 2016 @01:03PM (#11089065)
You could easily catch that within the method though. But in general I think throwing an exception on memory allocation failure is much better than the alternative, which is - in practice - assuming it succeeds and segfaulting.