2013-12-15 18:30:16 -05:00
|
|
|
/*
|
|
|
|
|
* IOException.cpp
|
|
|
|
|
*
|
|
|
|
|
* Created on: Oct 1, 2012
|
|
|
|
|
* Author: Mitchell Wills
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "networktables2/util/IOException.h"
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IOException::IOException(const char* msg) : message(strdup(msg)), errorValue(0){}
|
|
|
|
|
IOException::IOException(const char* msg, int _errorValue) : message(strdup(msg)), errorValue(_errorValue){}
|
|
|
|
|
|
2015-06-19 17:23:54 -07:00
|
|
|
const char* IOException::what() const noexcept {
|
2013-12-15 18:30:16 -05:00
|
|
|
return message;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IOException::isEOF(){return false;}
|
|
|
|
|
|
|
|
|
|
IOException::~IOException() throw (){
|
|
|
|
|
free((void*)message);
|
|
|
|
|
}
|