Skip to content

Commit

Permalink
Merge pull request #393 from jwillemsen/jwi-exceptiondatachange
Browse files Browse the repository at this point in the history
Updated because ExceptionData now contains a string_view
  • Loading branch information
jwillemsen authored Jun 18, 2024
2 parents 09fbeb6 + 39a68eb commit 044d3c2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tao/x11/messaging/exception_holder_i.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ namespace TAOX11_NAMESPACE
{
TAO_CORBA::ULong minor {};
TAO_CORBA::ULong completion {};
if (!(_tao_in >> minor) ||
!(_tao_in >> completion))
if (!(_tao_in >> minor) || !(_tao_in >> completion))
{
throw TAOX11_NAMESPACE::CORBA::MARSHAL (0, TAOX11_NAMESPACE::CORBA::COMPLETED_MAYBE);
}

TAO_CORBA::SystemException* exception =
TAO_TAO::create_system_exception (type_id.c_str());
TAO_CORBA::SystemException* exception = TAO_TAO::create_system_exception (type_id.c_str());

if (!exception)
{
Expand Down Expand Up @@ -89,11 +87,11 @@ namespace TAOX11_NAMESPACE
// This is important to decode the exception.
for (TAO_CORBA::ULong i = 0; i != this->count_; ++i)
{
if (std::strcmp (type_id.c_str(), this->data_[i].id) == 0)
if (type_id == this->data_[i].id)
{
TAO_CORBA::Exception * const exception = this->data_[i].alloc ();

if (exception == nullptr)
if (!exception)
{
throw TAOX11_NAMESPACE::CORBA::NO_MEMORY (0, TAOX11_NAMESPACE::CORBA::COMPLETED_YES);
}
Expand Down

0 comments on commit 044d3c2

Please sign in to comment.