8#ifndef INCLUDED_BDLJSN_ERROR
9#define INCLUDED_BDLJSN_ERROR
123#include <bdlscm_version.h>
137#include <bsl_ostream.h>
138#include <bsl_string.h>
139#include <bsl_string_view.h>
273 bsl::ostream&
print(bsl::ostream& stream,
275 int spacesPerLevel = 4)
const;
304template <
class HASHALG>
331, d_message(basicAllocator)
339: d_location(location)
340, d_message(message, basicAllocator)
346: d_location(original.d_location)
347, d_message(original.d_message, basicAllocator)
363: d_location(
bslmf::MovableRefUtil::move(
364 bslmf::MovableRefUtil::access(original).d_location))
365, d_message(
bslmf::MovableRefUtil::move(
366 bslmf::MovableRefUtil::access(original).d_message),
381 d_message = rhs.d_message;
382 d_location = rhs.d_location;
456 return lhs.location() == rhs.location() && lhs.message() == rhs.message();
462 return lhs.location() !=
rhs.location() ||
lhs.message() !=
rhs.message();
466template <
class HASHALG>
470 using ::BloombergLP::bslh::hashAppend;
Definition bdljsn_error.h:155
~Error()
Destroy this object.
Definition bdljsn_error.h:372
const bsl::string & message() const
Return the message attribute of this object.
Definition bdljsn_error.h:437
Error & setMessage(const bsl::string_view &value)
Set the message attribute of this object to the specified value.
Definition bdljsn_error.h:412
friend void swap(Error &, Error &)
BSLMF_NESTED_TRAIT_DECLARATION(Error, bslma::UsesBslmaAllocator)
const Location & location() const
Return the location attribute of this object.
Definition bdljsn_error.h:431
Error & operator=(const Error &rhs)
Definition bdljsn_error.h:378
bslma::Allocator * allocator() const
Definition bdljsn_error.h:445
Error()
Definition bdljsn_error.h:322
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
BSLMF_NESTED_TRAIT_DECLARATION(Error, bslmf::IsBitwiseMoveable)
Error & setLocation(const Location &value)
Set the location attribute of this object to the specified value.
Definition bdljsn_error.h:405
Error & reset()
Definition bdljsn_error.h:397
Definition bdljsn_location.h:168
Location & reset()
Definition bdljsn_location.h:310
Definition bslstl_stringview.h:471
Definition bslstl_string.h:1252
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Return the allocator used by this string to supply memory.
Definition bslstl_string.h:7423
void clear() BSLS_KEYWORD_NOEXCEPT
Definition bslstl_string.h:6043
static void swap(T *a, T *b)
Definition bslalg_swaputil.h:182
Definition bslma_allocator.h:545
Definition bslmf_movableref.h:752
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:674
void hashAppend(HASH_ALGORITHM &hashAlgorithm, const BigEndianInt16 &object)
Definition bdljsn_error.h:142
bool operator!=(const Error &lhs, const Error &rhs)
void swap(Error &a, Error &b)
bool operator==(const Error &lhs, const Error &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const Error &object)
void hashAppend(HASHALG &hashAlgorithm, const Error &object)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
Definition bdlbb_blob.h:579
Definition bslma_usesbslmaallocator.h:344
Definition bslmf_isbitwisemoveable.h:718
static MovableRef< t_TYPE > move(t_TYPE &reference) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1067
static t_TYPE & access(t_TYPE &ref) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1039