Commit 609a49a5 authored by Steven Murray's avatar Steven Murray
Browse files

Improved exception handling of mediachanger::MediaChangerFacade

parent 245741b4
......@@ -60,10 +60,11 @@ void castor::mediachanger::MediaChangerFacade::mountTapeReadOnly(
throw ex;
}
}
} catch(castor::exception::Exception &ex) {
} catch(castor::exception::Exception &ne) {
castor::exception::Exception ex;
ex.getMessage() << "Failed to mount tape for read-only access"
": vid=" << vid << " librarySlot=" << librarySlot.str();
": vid=" << vid << " librarySlot=" << librarySlot.str() << ": " <<
ne.getMessage().str();
throw ex;
}
}
......@@ -92,10 +93,11 @@ void castor::mediachanger::MediaChangerFacade::mountTapeReadWrite(
throw ex;
}
}
} catch(castor::exception::Exception &ex) {
} catch(castor::exception::Exception &ne) {
castor::exception::Exception ex;
ex.getMessage() << "Failed to mount tape for read/write access"
": vid=" << vid << " librarySlot=" << librarySlot.str();
": vid=" << vid << " librarySlot=" << librarySlot.str() << ": " <<
ne.getMessage().str();
throw ex;
}
}
......@@ -124,10 +126,11 @@ void castor::mediachanger::MediaChangerFacade::dismountTape(
throw ex;
}
}
} catch(castor::exception::Exception &ex) {
} catch(castor::exception::Exception &ne) {
castor::exception::Exception ex;
ex.getMessage() << "Failed to dismount tape"
": vid=" << vid << " librarySlot=" << librarySlot.str();
": vid=" << vid << " librarySlot=" << librarySlot.str() << ": " <<
ne.getMessage().str();
throw ex;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment