Re: Imath: exceptions w/o Iex

Nick Porcino

Zero overhead C++ exceptions remain a future fantasy. I'll second what Larry said, and posit that a non-throwing variant should be a baseline requirement, to the degree that the throwing variants can be optionally elided completely. If that means the noexcept code has to go in an isolated namespace, I'm fine with that. A special namespace might be a principled way to move forward.

On Fri, Jun 5, 2020 at 2:26 PM Larry Gritz <lg@...> wrote:
std::domain_error seems more on point

I would certainly like to see, as early in the process as practical, a non-throwing variant of every function that currently uses exceptions.

On Jun 5, 2020, at 1:57 PM, Owen T. via <> wrote:

Seeing as we had decided to remove Iex from Imath I wanted to ask what kind of exceptions should be thrown in lieu of those included in Iex.

For instance, Vec2<T>::normalizeExc() will throw NullVecExc as you can't normalize a vector of length 0.

Should it instead now be std::range_error or something else entirely?

Larry Gritz

Nick Porcino @meshula
Virtual and augmented production, interactive applications, and robotics, since 1982

Join to automatically receive all group messages.