Improve CellStore exception messages.

celladd
Jordan Ayers 10 years ago
parent c21b59ecff
commit 399259a95c

@ -3,6 +3,8 @@
#include <algorithm> #include <algorithm>
#include <stdexcept> #include <stdexcept>
#include <string>
#include <typeinfo>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include "livecellref.hpp" #include "livecellref.hpp"
@ -181,12 +183,12 @@ namespace MWWorld
template <class T> template <class T>
CellRefList<T>& get() { CellRefList<T>& get() {
throw std::runtime_error ("Storage for this type not exist in cells"); throw std::runtime_error ("Storage for type " + std::string(typeid(T).name())+ " does not exist in cells");
} }
template <class T> template <class T>
CellRefList<T>& getReadOnly() { CellRefList<T>& getReadOnly() {
throw std::runtime_error ("Read Only access not available for this type"); throw std::runtime_error ("Read Only CellRefList access not available for type " + std::string(typeid(T).name()) );
} }
bool isPointConnected(const int start, const int end) const; bool isPointConnected(const int start, const int end) const;

Loading…
Cancel
Save