Custom exceptions should always inherit from std::exception

There may be other custom exceptions I missed.