|
From: <rum...@us...> - 2008-06-19 15:36:44
|
Revision: 198
http://gearbox.svn.sourceforge.net/gearbox/?rev=198&view=rev
Author: rumataxyz
Date: 2008-06-19 08:36:49 -0700 (Thu, 19 Jun 2008)
Log Message:
-----------
converted assorted thrown things to gbxutilacfr::Exception
Modified Paths:
--------------
gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
Modified: gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
===================================================================
--- gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-06-19 15:07:00 UTC (rev 197)
+++ gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-06-19 15:36:49 UTC (rev 198)
@@ -36,6 +36,7 @@
namespace gnua = gbxnovatelutilacfr;
namespace gna = gbxnovatelacfr;
+namespace gua = gbxutilacfr;
namespace {
// binary messages defined by novatel
@@ -54,7 +55,7 @@
// these guys are used to directly decode messages;
// obviously fails on endian mismatch, any sort of size mismatch and is rather nasty in general;
// feel free to implement something better
- // TODO: at least at runtime checking
+ // TODO: at least add runtime checking
gnua::BestGpsPosLogB bestGpsPos;
gnua::BestGpsVelLogB bestGpsVel;
gnua::InsPvaLogSB insPva;
@@ -100,7 +101,7 @@
void
Driver::configure( ) {
if(false == config_.isValid()){
- throw (std::string("Invalid Configuration!"));
+ throw (gua::Exception(ERROR_INFO, "Invalid Configuration!"));
}
// configure serial port
@@ -109,7 +110,7 @@
serial_.reset(new Serial( serialDevice, baud_, Serial::Timeout(1,0) ));
serial_->setDebugLevel(0);
if(0 != connectToHardware() ){
- throw (std::string("failed to connect to receiver!"));
+ throw (gua::Exception(ERROR_INFO, "failed to connect to receiver!"));
}
// just in case something is running... stops the novatel logging any messages
@@ -399,7 +400,7 @@
if(config_.ignoreUnknownMessages_){
tracer_->warning(ss.str());
}else{
- throw( ss.str() );
+ gua::Exception(ERROR_INFO, ss.str() );
}
}
break;
@@ -409,7 +410,7 @@
std::stringstream ss;
ss << "Warning("<<__FILE__<<":"<< __LINE__
<< "Timed out while waiting for data";
- throw (ss.str());
+ gua::Exception(ERROR_INFO, ss.str());
}
}while(NULL == data.get()); // repeat till we get valid data
@@ -835,7 +836,7 @@
if(in_crc != crc) {
fprintf( stderr,"CRC Error: 0x%lx, 0x%lx\n",in_crc,crc );
- throw std::string( "CRC Error" );
+ gua::Exception(ERROR_INFO, "CRC Error" );
return -1;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|