X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Fexcept.h;fp=source%2Flibmarklin%2Fexcept.h;h=85fe43175b0e739cd93f21f5aea93b69952f7e40;hb=7839b7c3d782abb5c98a24d51cae109407068c02;hp=0000000000000000000000000000000000000000;hpb=3df8cb5c78fbb0b919bcb79677c6c788b8028482;p=r2c2.git diff --git a/source/libmarklin/except.h b/source/libmarklin/except.h new file mode 100644 index 0000000..85fe431 --- /dev/null +++ b/source/libmarklin/except.h @@ -0,0 +1,31 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2009 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + +#ifndef LIBMARKLIN_EXCEPT_H_ +#define LIBMARKLIN_EXCEPT_H_ + +#include + +namespace Marklin { + +class Train; + +class TurnoutBusy: public Msp::Exception +{ +private: + Train *train; + +public: + TurnoutBusy(Train *t): Exception("Turnout is busy"), train(t) { } + virtual ~TurnoutBusy() throw() { } + + Train *get_train() const throw() { return train; } +}; + +} + +#endif