summaryrefslogtreecommitdiff
path: root/core/config/engine.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-05-01 23:09:48 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-05-01 23:11:08 +0200
commit0eb9b414c13a67203b0d1cc5bd878afe63d3676b (patch)
treedaa264c3bb88191dc890cb39f957f48d221220cb /core/config/engine.cpp
parent33a0fb6e02ce9ee5d2fe97377a3ec84591b59f7c (diff)
Add `Engine.print_error_messages` property to disable printing errors
This can be used during unit test suite runs to hide error and warning messages. Care should be taken when using this feature, as it can hide important information if used wrongly.
Diffstat (limited to 'core/config/engine.cpp')
-rw-r--r--core/config/engine.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index 2360d66438..02a183cef5 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -189,6 +189,14 @@ bool Engine::is_validation_layers_enabled() const {
return use_validation_layers;
}
+void Engine::set_print_error_messages(bool p_enabled) {
+ _print_error_enabled = p_enabled;
+}
+
+bool Engine::is_printing_error_messages() const {
+ return _print_error_enabled;
+}
+
void Engine::add_singleton(const Singleton &p_singleton) {
singletons.push_back(p_singleton);
singleton_ptrs[p_singleton.name] = p_singleton.ptr;