SerialException.cpp
Go to the documentation of this file.
00001 /*
00002  * SerialException.cpp
00003  *
00004  *  Created on: Oct 13, 2011
00005  *      Author: mriedel
00006  */
00007 
00008 #include <telekyb_serial/SerialException.h>
00009 
00010 #include <ros/ros.h>
00011 
00012 namespace TELEKYB_NAMESPACE
00013 {
00014 
00015 SerialException::SerialException(const std::string& msg_, SerialExceptionCode code_,ros::console::Level level_)
00016         : msg(msg_), level(level_) , processed(false), code(code_) {
00017 
00018 }
00019 
00020 SerialException::~SerialException() throw() {
00021         if (!processed) {
00022                 process();
00023         }
00024 }
00025 
00026 void SerialException::process() {
00027 
00028         ROS_LOG_STREAM(level, ROSCONSOLE_DEFAULT_NAME, msg);
00029 
00030         if (level == ros::console::levels::Fatal) {
00031                 //ROS_BREAK();
00032                 ros::shutdown();
00033         }
00034 
00035         processed = true;
00036 }
00037 
00038 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines


telekyb_serial
Author(s): Martin Riedel
autogenerated on Mon Nov 11 2013 11:14:08