diff --git a/src/Attributes.cpp b/src/Attributes.cpp index b52e5fb..4d6592f 100644 --- a/src/Attributes.cpp +++ b/src/Attributes.cpp @@ -24,9 +24,9 @@ GLint sb::Attributes::index() const catch (const std::bad_variant_access&) { std::ostringstream message; - message << "Trying to get index for " << dimensions() << "D " << size() << "b attributes, but no index has been set yet. Assign an" - << " index with glBindAttribLocation and copy it to Attributes::index(GLint) or look up the index automatically at bind time by" - << " passing the location name and linked shader program index to Attributes::bind(const std::string&, GLuint)."; + message << "Trying to get index for " << *this << ", but no index has been set yet. Assign an index with glBindAttribLocation and" + << " copy it to Attributes::index(GLint) or look up the index automatically at bind time by passing the location name and" + << " linked shader program index to Attributes::bind(const std::string&, GLuint)."; throw std::runtime_error(message.str()); } } diff --git a/src/Model.cpp b/src/Model.cpp index b52aff0..4c31d75 100644 --- a/src/Model.cpp +++ b/src/Model.cpp @@ -85,7 +85,7 @@ void sb::Model::enable() const catch (const std::runtime_error& error) { std::ostringstream message; - message << "Error enabling " << attributes.first << " attributes on model"; + message << "Error enabling " << attributes.first << " attributes on model: " << error.what(); throw std::runtime_error(message.str()); } }