Changeset 2897


Ignore:
Timestamp:
Dec 11, 2012, 8:27:40 AM (9 years ago)
Author:
Peter
Message:

prefer throwing yat::utility::runtime_error. refs #729

Location:
trunk/yat/omic
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/omic/BamFile.cc

    r2895 r2897  
    2020#include "BamFile.h"
    2121#include "BamHeader.h"
     22
     23#include "yat/utility/Exception.h"
    2224
    2325#include <bam.h>
     
    6264        std::ostringstream ss;
    6365        ss << "cannot load bam index '" << filename() << ".bai'";
    64         throw std::runtime_error(ss.str());
     66        throw utility::runtime_error(ss.str());
    6567      }
    6668    }
     
    8789      else
    8890        ss << " error: " << result_;
    89       throw std::runtime_error(ss.str());
     91      throw utility::runtime_error(ss.str());
    9092    }
    9193    return result_>=0;
     
    104106      else
    105107        ss << " error: " << result_;
    106       throw std::runtime_error(ss.str());
     108      throw utility::runtime_error(ss.str());
    107109    }
    108110    return result_>=0;
  • trunk/yat/omic/BamFile.h

    r2884 r2897  
    2121#include "BamHeader.h"
    2222#include "BamRead.h"
     23
     24#include "yat/utility/Exception.h"
    2325
    2426#include <sam.h>
     
    241243      std::ostringstream ss;
    242244      ss << "failed open " << fn;
    243       throw std::runtime_error(ss.str());
     245      throw utility::runtime_error(ss.str());
    244246    }
    245247  }
  • trunk/yat/omic/BamReadIterator.cc

    r2895 r2897  
    1919
    2020#include "BamFile.h"
     21
     22#include "yat/utility/Exception.h"
    2123
    2224#include <cstddef>
     
    9294        in_ = NULL;
    9395    }
    94     catch (std::runtime_error& e) {
     96    catch (utility::runtime_error& e) {
    9597      in_ = NULL;
    9698      throw e;
     
    120122        in_ = NULL;
    121123    }
    122     catch (std::runtime_error& e) {
     124    catch (utility::runtime_error& e) {
    123125      in_ = NULL;
    124126      throw e;
Note: See TracChangeset for help on using the changeset viewer.