Implemented the "proper exception" in 7da00d2f2e782f5280fe31a400b245a0e0839b3c.