错误处理

This commit is contained in:
2026-08-16 18:33:24 +08:00
parent 8612b5ff86
commit 389ff81d42
44 changed files with 536 additions and 261 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
#pragma once
#include <renderive/error/Error_Policy.hpp>
#include "Gallery_Enum.h"
#include "common/Gallery_Performance_Types.h"
@@ -76,7 +77,7 @@ struct Value_Adapter<renderive::Plot_Frame_Mode, Json> {
const auto parsed =
renderive::web::gallery_enum_cast<renderive::Plot_Frame_Mode>(value);
if (!parsed)
throw std::invalid_argument("unknown frame control mode: " + value);
::renderive::error::unexpected<std::invalid_argument>("unknown frame control mode: " + value);
target = *parsed;
}
};