1#ifndef SOURCEMETA_CORE_URI_ERROR_H_
2#define SOURCEMETA_CORE_URI_ERROR_H_
4#ifndef SOURCEMETA_CORE_URI_EXPORT
5#include <sourcemeta/core/uri_export.h>
13namespace sourcemeta::core {
19#pragma warning(disable : 4251 4275)
29 [[nodiscard]]
auto what() const noexcept -> const
char *
override {
30 return "The input is not a valid URI";
34 [[nodiscard]]
auto column() const noexcept -> std::uint64_t {
39 std::uint64_t column_;
44class SOURCEMETA_CORE_URI_EXPORT
URIError :
public std::exception {
47 URIError(
const char *message) : message_{message} {}
48 URIError(std::string message) =
delete;
49 URIError(std::string &&message) =
delete;
50 URIError(std::string_view message) =
delete;
52 [[nodiscard]]
auto what() const noexcept -> const
char *
override {
53 return this->message_;
61#pragma warning(default : 4251 4275)
URIError(const char *message)
Construct an error with the given message.
Definition uri_error.h:47
auto column() const noexcept -> std::uint64_t
Get the column number of the error.
Definition uri_error.h:34
URIParseError(const std::uint64_t column)
Construct an error from the column at which parsing failed.
Definition uri_error.h:27