error.hpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. //
  2. // Copyright (c) 2019 Vinnie Falco ([email protected])
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Official repository: https://github.com/boostorg/url
  8. //
  9. #ifndef BOOST_URL_ERROR_HPP
  10. #define BOOST_URL_ERROR_HPP
  11. #include <boost/url/detail/config.hpp>
  12. #include <boost/url/error_types.hpp>
  13. #include <stdexcept>
  14. namespace boost {
  15. namespace urls {
  16. /** Error codes returned the library
  17. */
  18. enum class error
  19. {
  20. // VFALCO 3 space indent or
  21. // else Doxygen malfunctions
  22. /**
  23. * The operation completed successfully.
  24. */
  25. success = 0,
  26. /**
  27. * Null encountered in pct-encoded.
  28. */
  29. illegal_null,
  30. /**
  31. * Illegal reserved character in encoded string.
  32. */
  33. illegal_reserved_char,
  34. /**
  35. * A grammar element was not in canonical form.
  36. */
  37. non_canonical,
  38. //--------------------------------------------
  39. /**
  40. * Bad hexadecimal digit.
  41. This error condition is fatal.
  42. */
  43. bad_pct_hexdig,
  44. /**
  45. * The percent-encoded sequence is incomplete.
  46. This error condition is fatal.
  47. */
  48. incomplete_encoding,
  49. /**
  50. * Missing hexadecimal digit.
  51. This error condition is fatal.
  52. */
  53. missing_pct_hexdig,
  54. /**
  55. * No space in output buffer
  56. This error is returned when a provided
  57. output buffer was too small to hold
  58. the complete result of an algorithm.
  59. */
  60. no_space,
  61. /**
  62. * The URL is not a base URL
  63. */
  64. not_a_base
  65. };
  66. } // urls
  67. } // boost
  68. #include <boost/url/impl/error.hpp>
  69. #endif