X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgame%2Fstage.cpp;h=7cad5bc250873b9e8c265ce3aacb617a9c8abcdb;hb=e55354bb994276f83592397899bdf77926e8c769;hp=43446bd9d8e7af9ba6d03f5fd13d9a49d2e72d42;hpb=a99b57a74252fd3de649d544d070b747f91fcf4d;p=libs%2Fgame.git diff --git a/source/game/stage.cpp b/source/game/stage.cpp index 43446bd..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,12 +59,19 @@ void Stage::tick(Time::TimeDelta dt) { { #ifdef DEBUG - AccessGuard::BlockForScope _block;; + AccessGuard::BlockForScope _block; #endif for(const auto &s: systems) { System::Activator act(*s); - s->tick(dt); + try + { + s->tick(dt); + } + catch(const invalid_access &exc) + { + throw invalid_access(format("%s by %s", exc.what(), Debug::demangle(typeid(*s).name()))); + } } }