X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fapi%2Finternal%2FBamFile_p.cpp;h=3927d302879388516c1093eafe440f0ed963a3c9;hb=2e1822c9ed231b25fd474117a01a1492d4209fa4;hp=6cb5be49845d445f04d0908f709027375c58ae6e;hpb=c1fc1c5423ca73a1b5bcbe790650821d73e5959c;p=bamtools.git diff --git a/src/api/internal/BamFile_p.cpp b/src/api/internal/BamFile_p.cpp index 6cb5be4..3927d30 100644 --- a/src/api/internal/BamFile_p.cpp +++ b/src/api/internal/BamFile_p.cpp @@ -2,7 +2,7 @@ // BamFile_p.cpp (c) 2011 Derek Barnett // Marth Lab, Department of Biology, Boston College // --------------------------------------------------------------------------- -// Last modified: 9 September 2011 (DB) +// Last modified: 7 October 2011 (DB) // --------------------------------------------------------------------------- // Provides BAM file-specific IO behavior // *************************************************************************** @@ -44,15 +44,15 @@ bool BamFile::Open(const IBamIODevice::OpenMode mode) { else if ( mode == IBamIODevice::WriteOnly ) m_stream = fopen(m_filename.c_str(), "wb"); else { - SetErrorString("BamFile ERROR - unknown device open mode"); + SetErrorString("BamFile::Open", "unknown open mode requested"); return false; } // check that we obtained a valid FILE* if ( m_stream == 0 ) { - string error = "BamFile ERROR - could not open handle on "; - error += ( (m_filename.empty()) ? "empty filename" : m_filename ); - SetErrorString(error); + const string message_base = string("could not open file handle for "); + const string message = message_base + ( (m_filename.empty()) ? "empty filename" : m_filename ); + SetErrorString("BamFile::Open", message); return false; } @@ -63,6 +63,5 @@ bool BamFile::Open(const IBamIODevice::OpenMode mode) { bool BamFile::Seek(const int64_t& position) { BT_ASSERT_X( m_stream, "BamFile::Seek() - null stream" ); - cerr << "BamFile::Seek() - about to attempt seek" << endl; - return ( fseek64(m_stream, position, SEEK_SET) == 0); + return ( fseek64(m_stream, position, SEEK_SET) == 0 ); }