From dc999ac989fde4e454da55bf7f12065b434ab445 Mon Sep 17 00:00:00 2001 From: jean-pierre roux Date: Wed, 27 May 2009 10:36:46 +0000 Subject: [PATCH] change exception codes --- lib/src1/brukerobjectvaryingproperties.cpp | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/src1/brukerobjectvaryingproperties.cpp b/lib/src1/brukerobjectvaryingproperties.cpp index 5e9b92c..cbdac4e 100644 --- a/lib/src1/brukerobjectvaryingproperties.cpp +++ b/lib/src1/brukerobjectvaryingproperties.cpp @@ -10,7 +10,7 @@ // // #include "brukerobjectvaryingproperties.h" - +//#include "brukerexception.h" BrukerObjectVaryingProperties::BrukerObjectVaryingProperties() @@ -53,7 +53,7 @@ double BrukerObjectVaryingProperties::getTE(unsigned int theValue) const{ double BrukerObjectVaryingProperties::getPositionP(unsigned int theValue) const{ if (theValue < PositionP.size() ) return PositionP[theValue]; - else throw 0; + else throw 1; } /*void BrukerObjectVaryingProperties::setPositionP(const std::vector< double >& theValue) @@ -63,7 +63,7 @@ double BrukerObjectVaryingProperties::getPositionP(unsigned int theValue) const double BrukerObjectVaryingProperties::getPositionR(unsigned int theValue) const{ if (theValue < PositionR.size() ) return PositionR[theValue]; - else throw 0; + else throw 2; } /*void BrukerObjectVaryingProperties::setPositionR(const std::vector< double >& theValue) @@ -73,7 +73,7 @@ double BrukerObjectVaryingProperties::getPositionR(unsigned int theValue) const double BrukerObjectVaryingProperties::getPositionS(unsigned int theValue) const{ if (theValue < PositionS.size() ) return PositionS[theValue]; - else throw 0; + else throw 3; } /*void BrukerObjectVaryingProperties::setPositionS(const std::vector< double >& theValue) @@ -83,35 +83,35 @@ double BrukerObjectVaryingProperties::getPositionS(unsigned int theValue) const int BrukerObjectVaryingProperties::getAcquisitionOrder(unsigned int theValue) const{ if (theValue & theValue1, const std::vector< int >& theValue2) { AcquisitionOrder.clear(); - if (theValue1.size() != theValue2[3]*theValue2[1]) throw 0; - if (theValue2.size() < 4 ) throw 0; + if (theValue1.size() != theValue2[3]*theValue2[1]) throw 5; + if (theValue2.size() < 4 ) throw 6; for (int i =0 ;i & BrukerHM, std::vector & LoopStruct){ std::vector AcqOrder; - if (BrukerHM[(std::string) "ACQ_obj_order"].GetIntValue().size() != LoopStruct[3]*LoopStruct[1]) throw 0; - if (LoopStruct.size() < 4 ) throw 0; + if (BrukerHM[(std::string) "ACQ_obj_order"].GetIntValue().size() != LoopStruct[3]*LoopStruct[1]) throw 7; + if (LoopStruct.size() < 4 ) throw 8; for (int i =0 ;i > BrukerObjectVaryingProperties::getOrientation(unsigned int theValue) const{ - if (theValue & theValue1,const std::vector< int >& theValue2) { - if (theValue1.size() != theValue2[3]*9) throw 0; - if (theValue2.size() < 4 ) throw 0; + if (theValue1.size() != theValue2[3]*9) throw 10; + if (theValue2.size() < 4 ) throw 11; int counter=0; for(int i=0;i > BrukerObjectVaryingProperties::getOr }*/ void BrukerObjectVaryingProperties::setOrientation(std::map & BrukerHM, std::vector & LoopStruct){ - if (BrukerHM[(std::string) "ACQ_grad_matrix"].GetDoubleValue().size() != LoopStruct[3]*9) throw 0; - if (LoopStruct.size() < 4 ) throw 0; + if (BrukerHM[(std::string) "ACQ_grad_matrix"].GetDoubleValue().size() != LoopStruct[3]*9) throw 12; + if (LoopStruct.size() < 4 ) throw 13; std::vector Temp1D(3,0.0); std::vector > Temp2D; @@ -151,7 +151,7 @@ void BrukerObjectVaryingProperties::setOrientation(std::map & BrukerHM, std::vector & LoopStruct){ @@ -181,7 +181,7 @@ void BrukerObjectVaryingProperties::setPositionTimePerNR(std::map