diff options
Diffstat (limited to 'core/engine.cpp')
-rw-r--r-- | core/engine.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/engine.cpp b/core/engine.cpp index 0dd0459403..b9dc057257 100644 --- a/core/engine.cpp +++ b/core/engine.cpp @@ -38,7 +38,7 @@ void Engine::set_iterations_per_second(int p_ips) { - ERR_FAIL_COND(p_ips <= 0); + ERR_FAIL_COND_MSG(p_ips <= 0, "Engine iterations per second must be greater than 0."); ips = p_ips; } int Engine::get_iterations_per_second() const { @@ -197,10 +197,7 @@ void Engine::add_singleton(const Singleton &p_singleton) { Object *Engine::get_singleton_object(const String &p_name) const { const Map<StringName, Object *>::Element *E = singleton_ptrs.find(p_name); - if (!E) { - ERR_EXPLAIN("Failed to retrieve non-existent singleton '" + p_name + "'"); - ERR_FAIL_V(NULL); - } + ERR_FAIL_COND_V_MSG(!E, NULL, "Failed to retrieve non-existent singleton '" + p_name + "'."); return E->get(); }; |