Rearranging exceptions to remove unneeded dependency on sprot.