X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fobjectloader.h;h=f1cb6ffe051c5f8405fa652a67d36b3001dee380;hb=302f73123da1194dd91b43138cd880cae9318a14;hp=515ea6b8b81c6d51338735a704f960a0f27b802a;hpb=3eb3c5cce35d3d6193afadecc3707f9c2448f370;p=libs%2Fdatafile.git diff --git a/source/objectloader.h b/source/objectloader.h index 515ea6b..f1cb6ff 100644 --- a/source/objectloader.h +++ b/source/objectloader.h @@ -1,18 +1,18 @@ -/* $Id$ - -This file is part of libmspdatafile -Copyright © 2010 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_DATAFILE_OBJECTLOADER_H_ #define MSP_DATAFILE_OBJECTLOADER_H_ +#include #include "loader.h" namespace Msp { namespace DataFile { +class no_collection: public std::runtime_error +{ +public: + no_collection(const std::type_info &); +}; + class Collection; /** @@ -54,7 +54,7 @@ public: C &get_collection() const { if(!coll) - throw InvalidState("No collection"); + throw no_collection(typeid(O)); return *coll; } };