Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
experimental_features.hpp
Go to the documentation of this file.
1// -------------------------------------------------------//
2//
3// SHAMROCK code for hydrodynamics
4// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7//
8// -------------------------------------------------------//
9
10#pragma once
11
21#include <stdexcept>
22
23namespace shamrock {
24
27
30
33 const std::string &message, SourceLocation loc = SourceLocation{}) {
34
37 }
38 }
39
43 public:
45 const std::string &custom_message, SourceLocation loc = SourceLocation{}) {
46 experimental_feature_check(custom_message, loc);
47 }
48
51 "You are trying to use experimental features without having enabled", loc) {}
52 };
53
54} // namespace shamrock
Source location utility.
This header file contains utility functions related to exception handling in the code.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
namespace for the main framework
Definition __init__.py:1
void experimental_feature_check(const std::string &message, SourceLocation loc=SourceLocation{})
Check if experimental features are enabled, if not throw with the given message.
bool are_experimental_features_allowed()
Allow the use of experimental features.
void enable_experimental_features()
Allow the use of experimental features.
provide information about the source location