Skip to content

Commit

Permalink
Fix build failures and IceDB exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Mar 14, 2024
1 parent 9605947 commit 5741a16
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 38 deletions.
12 changes: 3 additions & 9 deletions cpp/include/Ice/IconvStringConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace Ice
* Indicates that Iconv does not support the code.
* \headerfile Ice/Ice.h
*/
class ICE_API IconvInitializationException : public IceUtil::Exception
class ICE_API IconvInitializationException final : public IceUtil::Exception
{
public:
using IceUtil::Exception::Exception;
Expand All @@ -52,19 +52,13 @@ namespace Ice
* Obtains the Slice type ID of this exception.
* @return The fully-scoped type ID.
*/
std::string ice_id() const override;
std::string ice_id() const final;

/**
* Prints a description of this exception to the given stream.
* @param str The output stream.
*/
void ice_print(std::ostream& str) const override;

/**
* Obtains the reason for the failure.
* @return The reason.
*/
std::string reason() const noexcept;
void ice_print(std::ostream& str) const final;

private:
std::string _reason;
Expand Down
5 changes: 0 additions & 5 deletions cpp/src/Ice/IconvStringConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,4 @@ IconvInitializationException::ice_id() const
return "::Ice::IconvInitializationException";
}

string
IconvInitializationException::reason() const noexcept
{
return _reason;
}
#endif
18 changes: 0 additions & 18 deletions cpp/src/IceDB/IceDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ LMDBException::ice_print(ostream& out) const
out << ": " << mdb_strerror(_error);
}

void
LMDBException::ice_throw() const
{
throw *this;
}

int
LMDBException::error() const
{
Expand Down Expand Up @@ -61,12 +55,6 @@ KeyTooLongException::ice_print(ostream& out) const
out << "Max size = " << maxKeySize;
}

void
KeyTooLongException::ice_throw() const
{
throw *this;
}

BadEnvException::BadEnvException(const char* file, int line, size_t size) : IceUtil::Exception(file, line), _size(size)
{
}
Expand All @@ -85,12 +73,6 @@ BadEnvException::ice_print(ostream& out) const
out << ", IceDB max key size = " << maxKeySize;
}

void
BadEnvException::ice_throw() const
{
throw *this;
}

Env::Env(const string& path, MDB_dbi maxDbs, size_t mapSize, unsigned int maxReaders)
{
int rc = mdb_env_create(&_menv);
Expand Down
3 changes: 0 additions & 3 deletions cpp/src/IceDB/IceDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ namespace IceDB

virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
virtual void ice_throw() const;

int error() const;

Expand All @@ -69,7 +68,6 @@ namespace IceDB

virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
virtual void ice_throw() const;

private:
const size_t _size;
Expand All @@ -87,7 +85,6 @@ namespace IceDB

virtual std::string ice_id() const;
virtual void ice_print(std::ostream&) const;
virtual void ice_throw() const;

private:
const size_t _size;
Expand Down
4 changes: 2 additions & 2 deletions cpp/test/Ice/operations/TwowaysAMI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -976,9 +976,9 @@ namespace
{
called();
}
catch (const std::exception& ex)
catch (const std::exception& e)
{
cerr << ex.what() << endl;
cerr << e.what() << endl;
test(false);
}
catch (...)
Expand Down
2 changes: 1 addition & 1 deletion matlab/src/ObjectPrx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ extern "C"
{
assert(f->getException());
delete reinterpret_cast<shared_ptr<InvocationFuture>*>(self);
return createResultException(f->getException());
return createResultException(convertException(f->getException()));
}

bool ok;
Expand Down

0 comments on commit 5741a16

Please sign in to comment.