Skip to content

Commit

Permalink
display name instead of path in error message Refs #12653
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahroz Ahmed committed Aug 3, 2015
1 parent 4e9e246 commit 37d3622
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Code/Mantid/Framework/Nexus/src/NexusClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,9 @@ bool NXClass::isValid(const std::string &path) const {
void NXClass::open() {
// if (NX_ERROR == NXopengroup(m_fileID,name().c_str(),NX_class().c_str()))
//{
if (NX_ERROR == NXopengrouppath(m_fileID, m_path.c_str())) {
throw std::runtime_error("Cannot open group " + m_path + " of class " +
if (NX_ERROR == NXopengrouppath(m_fileID, name().c_str())) {

throw std::runtime_error("Cannot open group " + name() + " of class " +
NX_class());
}
//}
Expand Down Expand Up @@ -215,7 +216,7 @@ bool NXClass::openLocal(const std::string &nxclass) {

void NXClass::close() {
if (NX_ERROR == NXclosegroup(m_fileID)) {
throw std::runtime_error("Cannot close group " + m_path + " of class " +
throw std::runtime_error("Cannot close group " + name() + " of class " +
NX_class());
}
m_open = false;
Expand Down

0 comments on commit 37d3622

Please sign in to comment.