浏览代码

fixed exception throw using fthrow

Johannes Ruehle 12 年之前
父节点
当前提交
0b6028f85c
共有 5 个文件被更改,包括 11 次插入11 次删除
  1. 1 1
      baselib/Globals.cpp
  2. 7 7
      baselib/Gnuplot.cpp
  3. 1 1
      baselib/ProgressBarQt.cpp
  4. 1 1
      cbaselib/MultiDataset.cpp
  5. 1 1
      cbaselib/progs/createNormTrainingSet.cpp

+ 1 - 1
baselib/Globals.cpp

@@ -84,7 +84,7 @@ std::string Globals::getCacheFilename ( const std::string & root, int cache_mode
           exit(-1);
         }
 #else
-		  throw std::exception("mkdir function not defined on system. try using boost lib and rebuild library");
+		  fthrow(Exception,"mkdir function not defined on system. try using boost lib and rebuild library");
 #endif
 #else
 		  if ( mkdir(dir.c_str(), 0755) < 0 )

+ 7 - 7
baselib/Gnuplot.cpp

@@ -166,7 +166,7 @@ void Gnuplot::checkSystemVariablesOpenGnuplotCommand()
 	this->nplots = 0;
 	this->valid = true;
 #else
-	throw std::exception("function not yet ported for win32");
+	throw GnuplotException("function not yet ported for win32");
 #endif
 }
 
@@ -183,7 +183,7 @@ Gnuplot::~Gnuplot()
 	}
 	return;
 #else
-	throw std::exception("function not yet ported for win32");
+	throw GnuplotException("function not yet ported for win32");
 #endif
 }
 
@@ -216,7 +216,7 @@ bool Gnuplot::get_program_path(const std::string pname)
 	}
 	return false;
 #else
-	throw std::exception("function not yet ported for win32");
+	throw GnuplotException("function not yet ported for win32");
 #endif
 }
 
@@ -453,7 +453,7 @@ void Gnuplot::plot_x(vector<double> d, const std::string &title)
 
 	return;
 #else
-	throw std::exception("function not yet ported for win32");
+	throw GnuplotException("function not yet ported for win32");
 #endif
 }
 
@@ -538,7 +538,7 @@ void Gnuplot::plot_xy(vector<double> x, vector<double> y,
 
 	return;
 #else
-	throw std::exception("function not yet ported for win32");
+	throw GnuplotException("function not yet ported for win32");
 #endif
 }
 
@@ -614,7 +614,7 @@ void Gnuplot::plot_xyz(vector<double> x, vector<double> y, vector<double> z,
 
 	return;
 #else
-	throw std::exception("function not yet ported for win32");
+	throw GnuplotException("function not yet ported for win32");
 #endif
 }
 
@@ -694,7 +694,7 @@ void Gnuplot::plot_image(unsigned char * ucPicBuf, int iWidth, int iHeight,
 
 	return;
 #else
-	throw std::exception("function not yet ported for win32");
+	throw GnuplotException("function not yet ported for win32");
 #endif
 }
 

+ 1 - 1
baselib/ProgressBarQt.cpp

@@ -96,7 +96,7 @@ double ProgressBarQt::getCurrentTime()
 {
 
 #ifdef WIN32
-	throw std::exception("function not yet ported, use boost::time_date here");
+	fthrow(Exception,"function not yet ported, use boost::time_date here");
 #else
   struct timeval curtime;
 

+ 1 - 1
cbaselib/MultiDataset.cpp

@@ -302,7 +302,7 @@ MultiDataset::MultiDataset( const Config *conf , LabeledSetFactory *pSetFactory)
 		boost::filesystem::path t_path(name.c_str());
 		boost::filesystem::create_directory(t_path);
 #else
-		  throw std::exception("mkdir function not defined on system. try using boost lib and rebuild library");
+		  fthrow(Exception,"mkdir function not defined on system. try using boost lib and rebuild library");
 #endif
 #else
       mkdir ( name.c_str(), 0755 );

+ 1 - 1
cbaselib/progs/createNormTrainingSet.cpp

@@ -219,7 +219,7 @@ int main (int argc, char **argv)
 	boost::filesystem::path t_path(dir.c_str());
 	int retcode = boost::filesystem::create_directory(t_path);
 #else
-		  throw std::exception("mkdir function not defined on system. try using boost lib and rebuild library");
+		 fthrow(Exception,"mkdir function not defined on system. try using boost lib and rebuild library");
 #endif
 #else
 	int retcode = mkdir ( dir.c_str(), 0700 );