DM-10401, I discovered that LSST code does not raise the correct exception unless the user has done import lsst.pex.exceptions first (RuntimeError gets raised instead). We can fix this by putting that import in every package's top-level _init_.py.
Unittests for this are tricky, though, because to use assertRaises(lsst.pex.exceptions.SomeError, you have to have imported pex.exceptions first, which means you aren't actually testing that the "internal" import happened. I proposed one solution in a comment on
DM-10401, but I don't like it. We might have to satisfy ourselves with just putting the pex.exceptions import in our top-level _init_.py and hoping that's enough?