1#ifndef SOURCEMETA_CORE_ERROR_BASE_H_
2#define SOURCEMETA_CORE_ERROR_BASE_H_
4#ifndef SOURCEMETA_CORE_ERROR_EXPORT
5#include <sourcemeta/core/error_export.h>
8#include <sourcemeta/core/text_static_string.h>
16#define SOURCEMETA_CORE_ERROR_WARNINGS_PUSH \
17 __pragma(warning(push)) __pragma(warning(disable : 4251 4275))
18#define SOURCEMETA_CORE_ERROR_WARNINGS_POP __pragma(warning(pop))
20#define SOURCEMETA_CORE_ERROR_WARNINGS_PUSH
21#define SOURCEMETA_CORE_ERROR_WARNINGS_POP
24namespace sourcemeta::core {
26SOURCEMETA_CORE_ERROR_WARNINGS_PUSH
48class SOURCEMETA_CORE_ERROR_EXPORT
Error :
public std::exception {
50 [[nodiscard]]
auto what()
const noexcept ->
const char *
final;
79 return this->message_;
87 StaticString message_;
90SOURCEMETA_CORE_ERROR_WARNINGS_POP
auto message() const noexcept -> StaticString
Definition error_base.h:78
Error(const StaticString message) noexcept
Construct the error given its message.
Definition error_base.h:84
Definition text_static_string.h:20