X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fstage.cpp;h=7cad5bc250873b9e8c265ce3aacb617a9c8abcdb;hb=e55354bb994276f83592397899bdf77926e8c769;hp=5663a71fadf8b36e1db21267724cf3d27e9530c2;hpb=f377d216dfc44e36da3697557f38dfedcbec45d1;p=libs%2Fgame.git diff --git a/source/game/stage.cpp b/source/game/stage.cpp index 5663a71..7cad5bc 100644 --- a/source/game/stage.cpp +++ b/source/game/stage.cpp @@ -1,4 +1,6 @@ #include "stage.h" +#include +#include #include "accessguard.h" #include "camera.h" #include "root.h" @@ -57,10 +59,20 @@ void Stage::tick(Time::TimeDelta dt) { { #ifdef DEBUG - AccessGuard::BlockForScope _block;; + AccessGuard::BlockForScope _block; #endif for(const auto &s: systems) - s->tick(dt); + { + System::Activator act(*s); + try + { + s->tick(dt); + } + catch(const invalid_access &exc) + { + throw invalid_access(format("%s by %s", exc.what(), Debug::demangle(typeid(*s).name()))); + } + } } for(const auto &s: systems)