[ox] Overhaul serialization/model system and add ModelValue/ModelObject/ModelUnion variant system
This commit is contained in:
6
deps/ox/src/ox/std/error.hpp
vendored
6
deps/ox/src/ox/std/error.hpp
vendored
@ -3,7 +3,7 @@
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
@ -31,7 +31,7 @@ class exception {
|
||||
#include "utility.hpp"
|
||||
|
||||
#define OxError(...) ox::Error(__FILE__, __LINE__, __VA_ARGS__)
|
||||
#define OxException(...) ox::Error(__FILE__, __LINE__, __VA_ARGS__)
|
||||
#define OxException(...) ox::Exception(__FILE__, __LINE__, __VA_ARGS__)
|
||||
|
||||
namespace ox {
|
||||
|
||||
@ -83,7 +83,7 @@ constexpr auto errCode(const Error &err) noexcept {
|
||||
template<typename T=const char*>
|
||||
[[nodiscard]]
|
||||
constexpr auto toStr(const Error &err) noexcept {
|
||||
return T(err.msg);
|
||||
return err.msg ? T(err.msg) : "";
|
||||
}
|
||||
|
||||
struct Exception: public std::exception {
|
||||
|
Reference in New Issue
Block a user