mirror of
https://github.com/JS8Call-improved/JS8Call-improved
synced 2026-08-13 17:47:36 -04:00
Rename all header files with .h extension Fix function declaration in HamlibTransceiver.h that overrode member function but was not marked override Remove unused variable in Modulator.cpp Remove unused files from source tree Remove duplicate LazyFillComboBox files Reformat codebase to LLVM C++ standard
35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
#include "MessageError.h"
|
|
|
|
/******************************************************************************/
|
|
// Private Implementation
|
|
/******************************************************************************/
|
|
|
|
namespace {
|
|
const struct final : public std::error_category {
|
|
const char *name() const noexcept override { return "message"; }
|
|
|
|
std::string message(int const ev) const override {
|
|
using MessageError::Code;
|
|
|
|
switch (static_cast<Code>(ev)) {
|
|
case Code::json_parsing_error:
|
|
return "json parsing error";
|
|
case Code::json_not_an_object:
|
|
return "json not an object";
|
|
|
|
default:
|
|
return "message error";
|
|
}
|
|
}
|
|
} Category;
|
|
} // namespace
|
|
|
|
/******************************************************************************/
|
|
// Implementation
|
|
/******************************************************************************/
|
|
|
|
namespace MessageError {
|
|
std::error_category const &category() noexcept { return Category; }
|
|
} // namespace MessageError
|
|
|
|
/******************************************************************************/
|