summaryrefslogtreecommitdiff
path: root/maximus/sci/src
diff options
context:
space:
mode:
authorlefranc2007-05-22 07:37:00 +0000
committerlefranc2007-05-22 07:37:00 +0000
commit365803e73edb1b1f207cd68a9fad93a11ed1ddee (patch)
tree50737c248ebb3e1eb80948ad23f9b20b01ecafc4 /maximus/sci/src
parentcc969dfd1b12994797d516dbd4ffd62e4db5b176 (diff)
added Error class
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@148 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'maximus/sci/src')
-rw-r--r--maximus/sci/src/SciServer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/maximus/sci/src/SciServer.cpp b/maximus/sci/src/SciServer.cpp
index 67432f168f..f59c644650 100644
--- a/maximus/sci/src/SciServer.cpp
+++ b/maximus/sci/src/SciServer.cpp
@@ -32,6 +32,7 @@ The original location of this file is /home/buret/eclipse/maximus/sci/src/SciSer
#include "Station.h"
#include "SciMsg.h"
#include "ClockSciMsg.h"
+#include "Error.h"
#include <stdlib.h>
#include <errno.h>
@@ -49,7 +50,7 @@ using namespace std;
//
-SciServer::SciServer ( ) throw (Error_Id):
+SciServer::SciServer ( ) :
server_thread(0),
status(MAXIMUS_SCI_SERVER_STATUS_NONE),
//server_mutex(),
@@ -63,7 +64,7 @@ mListOfStations(0)
int status;
status = pthread_create(&server_thread, NULL, SciServer::serverThread, this);
if(status != 0)
- throw errno;
+ throw new Error(__FUNCTION__, "pthread_create", errno);
}
@@ -365,10 +366,10 @@ Sci_Server_Status SciServer::getStatus (void)
}
-void SciServer::setStatus(Sci_Server_Status new_status) throw (Error_Id)
+void SciServer::setStatus(Sci_Server_Status new_status) throw (Error)
{
if((new_status < 0) || (new_status >= MAXIMUS_SCI_SERVER_STATUS_NB))
- throw EINVAL;
+ throw new Error(__FUNCTION__, "", EINVAL);
status = new_status;
return;
}