- Timestamp:
- 04/30/14 16:04:13 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/zfits.h
r17685 r17743 409 409 // uncompress the buffer 410 410 const uint32_t thisRoundNumRows = (GetNumRows()<fCurrentRow + fNumRowsPerTile) ? GetNumRows()%fNumRowsPerTile : fNumRowsPerTile; 411 UncompressBuffer(offsets, thisRoundNumRows, offset+sizeof(FITS::TileHeader)); 411 if (!UncompressBuffer(offsets, thisRoundNumRows, offset+sizeof(FITS::TileHeader))) 412 return false; 412 413 413 414 // pointer to column (source buffer) … … 444 445 default: 445 446 clear(rdstate()|std::ios::badbit); 447 448 std::ostringstream str; 449 str << "Unkown column ordering scheme found (i=" << i << ", " << fColumnOrdering[i] << ")"; 446 450 #ifdef __EXCEPTIONS 447 throw std::runtime_error( "Unkown column ordering scheme found");451 throw std::runtime_error(str); 448 452 #else 449 gLog << ___err___ << "ERROR - unkown column ordering scheme"<< std::endl;453 gLog << ___err___ << "ERROR - " << str.str() << std::endl; 450 454 return false; 451 455 #endif 452 break;453 456 }; 454 457 } … … 508 511 509 512 // Data has been read from disk. Uncompress it ! 510 voidUncompressBuffer(const std::vector<size_t> &offsets,513 bool UncompressBuffer(const std::vector<size_t> &offsets, 511 514 const uint32_t &thisRoundNumRows, 512 515 const uint32_t offset) … … 555 558 556 559 std::ostringstream str; 557 str << "Unk own processing applied to data. Col " << i << " proc " << j << " out of" << (int)head->numProcs;560 str << "Unknown processing applied to data (col=" << i << ", proc=" << j << "/" << (int)head->numProcs; 558 561 #ifdef __EXCEPTIONS 559 562 throw std::runtime_error(str.str()); 560 563 #else 561 gLog << ___err___ << "ERROR - Unknown processing applied to data. Aborting"<< std::endl;562 return ;564 gLog << ___err___ << "ERROR - " << str.str() << std::endl; 565 return false; 563 566 #endif 564 567 } … … 568 571 } 569 572 } 573 574 return true; 570 575 } 571 576
Note:
See TracChangeset
for help on using the changeset viewer.