SlHelpers
Loading...
Searching...
No Matches
SlHelpers::LastErrorStr< More > Class Template Reference

Stores a string (usually an error string) to be retrieved later. More...

#include <LastError.h>

Inheritance diagram for SlHelpers::LastErrorStr< More >:
SlHelpers::LastErrorBase< More... >

Public Member Functions

LastErrorStrreset () noexcept
 Wipe out everything.
template<typename T>
requires (std::is_convertible_v<T, std::string_view>)
void setError (T &&str)
 Store a string into this error.
const std::string & lastError () const &noexcept
 Obtain the stored string.
Public Member Functions inherited from SlHelpers::LastErrorBase< More... >
std::tuple_element_t< idx, Tuple > & get () noexcept
 Get n-th error member.
void set (Arg &&val) noexcept
 Set n-th error member.

Additional Inherited Members

Protected Member Functions inherited from SlHelpers::LastErrorBase< More... >
void resetMembers () noexcept
 Wipe out members.

Detailed Description

template<typename... More>
class SlHelpers::LastErrorStr< More >

Stores a string (usually an error string) to be retrieved later.

This class uses a string internally.

Member Function Documentation

◆ lastError()

template<typename... More>
const std::string & SlHelpers::LastErrorStr< More >::lastError ( ) const &
inlinenoexcept

Obtain the stored string.

Returns
The stored string.

◆ setError()

template<typename... More>
template<typename T>
requires (std::is_convertible_v<T, std::string_view>)
void SlHelpers::LastErrorStr< More >::setError ( T && str)
inline

Store a string into this error.

Parameters
strThe string to store

The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/slhelpers-20260428.f233ce9-build/slhelpers-20260428.f233ce9/include/helpers/LastError.h