Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Feb 22, 2024
1 parent 6317768 commit 5f9950d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
16 changes: 2 additions & 14 deletions cpp/include/Ice/LocalException.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,20 +362,8 @@ class ICE_CLASS(ICE_API) TwowayOnlyException : public LocalExceptionHelper<Twowa
* @param line The line number at which the exception was raised, typically __LINE__.
* @param operation The name of the operation that was invoked.
*/
TwowayOnlyException(const char* file, int line, const ::std::string& operation) : LocalExceptionHelper<TwowayOnlyException, LocalException>(file, line),
operation(operation)
{
}

/**
* One-shot constructor to initialize all data members.
* The file and line number are required for all local exceptions.
* @param file The file name in which the exception was raised, typically __FILE__.
* @param line The line number at which the exception was raised, typically __LINE__.
* @param operation The name of the operation that was invoked.
*/
TwowayOnlyException(const char* file, int line, ::std::string_view operation) : LocalExceptionHelper<TwowayOnlyException, LocalException>(file, line),
operation(operation)
TwowayOnlyException(const char* file, int line, ::std::string operation) : LocalExceptionHelper<TwowayOnlyException, LocalException>(file, line),
operation(std::move(operation))
{
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Ice/Proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Ice::ObjectPrx::_checkTwowayOnly(string_view name) const
{
if (!ice_isTwoway())
{
throw Ice::TwowayOnlyException(__FILE__, __LINE__, name);
throw Ice::TwowayOnlyException(__FILE__, __LINE__, string(name));
}
}

Expand Down

0 comments on commit 5f9950d

Please sign in to comment.