Skip to content

Commit

Permalink
elaborate error when trying to call get_default_world before set_defa…
Browse files Browse the repository at this point in the history
…ult_world
  • Loading branch information
evaleev committed Jan 24, 2023
1 parent 77ad20d commit 76a7475
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/TiledArray/external/madness.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ struct default_world {
TA_ASSERT(madness::initialized() &&
"TiledArray::detail::default_world::get() called "
"before madness::initialize() OR after madness::finalize()");
#if MADNESS_DISABLE_WORLD_GET_DEFAULT
TA_EXCEPTION(
"TiledArray::set_default_world() must be called before calling "
"TiledArray::get_default_world() if MADWorld configured with "
"DISABLE_WORLD_GET_DEFAULT=ON");
#endif
world() = &madness::World::get_default();
}
return *world();
Expand Down

0 comments on commit 76a7475

Please sign in to comment.