0.00% Lines (0/0) 0.00% Functions (0/0)
TLA Baseline Branch
Line Hits Code Line Hits Code
1 - //  
2 - // Copyright (c) 2026 Mohammad Nejati  
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/cppalliance/http  
8 - //  
9 -  
10 - #include <boost/http/zstd/error.hpp>  
11 -  
12 - namespace boost {  
13 - namespace http {  
14 - namespace zstd {  
15 - namespace detail {  
16 -  
17 - const char*  
DCB 18 - 1 error_cat_type::  
19 - name() const noexcept  
20 - {  
DCB 21 - 1 return "boost.http.zstd";  
22 - }  
23 -  
24 - std::string  
DCB 25 - 2 error_cat_type::  
26 - message(int ev) const  
27 - {  
DCB 28 - 2 switch(static_cast<error>(ev))  
29 - {  
DUB 30 - ✗ case error::no_error: return "no_error";  
DUB 31 - ✗ case error::generic: return "generic";  
DUB 32 - ✗ case error::prefix_unknown: return "prefix_unknown";  
DUB 33 - ✗ case error::version_unsupported: return "version_unsupported";  
DUB 34 - ✗ case error::frame_parameter_unsupported: return "frame_parameter_unsupported";  
DUB 35 - ✗ case error::frame_parameter_window_too_large: return "frame_parameter_window_too_large";  
DCB 36 - 3 case error::corruption_detected: return "corruption_detected";  
DUB 37 - ✗ case error::checksum_wrong: return "checksum_wrong";  
DUB 38 - ✗ case error::literals_header_wrong: return "literals_header_wrong";  
DUB 39 - ✗ case error::dictionary_corrupted: return "dictionary_corrupted";  
DUB 40 - ✗ case error::dictionary_wrong: return "dictionary_wrong";  
DUB 41 - ✗ case error::dictionary_creation_failed: return "dictionary_creation_failed";  
DUB 42 - ✗ case error::parameter_unsupported: return "parameter_unsupported";  
DUB 43 - ✗ case error::parameter_combination_unsupported: return "parameter_combination_unsupported";  
DUB 44 - ✗ case error::parameter_out_of_bound: return "parameter_out_of_bound";  
DUB 45 - ✗ case error::table_log_too_large: return "table_log_too_large";  
DUB 46 - ✗ case error::max_symbol_value_too_large: return "max_symbol_value_too_large";  
DUB 47 - ✗ case error::max_symbol_value_too_small: return "max_symbol_value_too_small";  
DUB 48 - ✗ case error::cannot_produce_uncompressed_block: return "cannot_produce_uncompressed_block";  
DUB 49 - ✗ case error::stability_condition_not_respected: return "stability_condition_not_respected";  
DUB 50 - ✗ case error::stage_wrong: return "stage_wrong";  
DUB 51 - ✗ case error::init_missing: return "init_missing";  
DUB 52 - ✗ case error::memory_allocation: return "memory_allocation";  
DUB 53 - ✗ case error::work_space_too_small: return "work_space_too_small";  
DUB 54 - ✗ case error::dst_size_too_small: return "dst_size_too_small";  
DUB 55 - ✗ case error::src_size_wrong: return "src_size_wrong";  
DUB 56 - ✗ case error::dst_buffer_null: return "dst_buffer_null";  
DUB 57 - ✗ case error::no_forward_progress_dest_full: return "no_forward_progress_dest_full";  
DUB 58 - ✗ case error::no_forward_progress_input_empty: return "no_forward_progress_input_empty";  
DCB 59 - 1 default:  
DCB 60 - 2 return "unknown";  
61 - }  
62 - }  
63 -  
64 - // msvc 14.0 has a bug that warns about inability  
65 - // to use constexpr construction here, even though  
66 - // there's no constexpr construction  
67 - #if defined(_MSC_VER) && _MSC_VER <= 1900  
68 - # pragma warning( push )  
69 - # pragma warning( disable : 4592 )  
70 - #endif  
71 -  
72 - #if defined(__cpp_constinit) && __cpp_constinit >= 201907L  
73 - constinit error_cat_type error_cat;  
74 - #else  
75 - error_cat_type error_cat;  
76 - #endif  
77 -  
78 - #if defined(_MSC_VER) && _MSC_VER <= 1900  
79 - # pragma warning( pop )  
80 - #endif  
81 -  
82 - } // detail  
83 - } // zstd  
84 - } // http  
85 - } // boost