74 {
75 try {
76 switch (version) {
77 case 1:
78 {
79 std::string methodstr {"undefined"};
82 methodstr = "Absolute";
83 break;
85 methodstr = "BinaryOffset";
86 break;
88 methodstr = "SignMagnitude";
89 break;
91 methodstr = "TwosComplement";
92 break;
93 }
95 cereal::make_nvp("method", methodstr));
96 switch (methodstr.front()) {
97 case 'B':
99 break;
100 case 'S':
102 break;
103 case 'T':
105 break;
106 case 'A':
107 default:
109 break;
110 }
111 break;
112 }
113 default:
114 {
115 constexpr auto msg {"The file, 'settings.xml', is marked as a version not "
116 "supported by the current version of MIDI2LR SettingsStruct, "
117 "and won't be loaded. File version: {}."};
119 fmt::format(fmt::runtime(juce::translate(msg).toStdString()), version),
120 fmt::format(fmt::runtime(msg), version), std::source_location::current());
121 }
122 break;
123 }
124 }
125 catch (const std::exception& e) {
127 throw;
128 }
129 }
@ kBinaryOffset
Definition ControlsModel.h:33
@ kTwosComplement
Definition ControlsModel.h:33
@ kAbsolute
Definition ControlsModel.h:33
@ kSignMagnitude
Definition ControlsModel.h:33
void ExceptionResponse(gsl::czstring id, gsl::czstring fu, const std::exception &e) noexcept
void LogAndAlertError(const juce::String &error_text, const std::source_location &location=std::source_location::current()) noexcept
Definition Misc.cpp:141