add more info to message when exeception is raised while enabling model attributes
This commit is contained in:
parent
f9d171626f
commit
67c3e193f4
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue