Files
allwpilib/networktables/cpp/include/networktables2/util/IOException.h
Brad Miller 69d9ad70ab CMake Changes
This is the changes made by Patrick Plenefisch converting the native
code to use CMake and the CMake Maven Plugin, as opposed to the
native Maven plugin. This is to allow for compatibility with newer
versions of the GCC toolchain. All the cpp sources were moved from
maven style directories to cpp style directories for CMake.

Change-Id: I67f5e3608948f37c83b0990d232105a3784f8593
2014-04-01 11:18:29 -04:00

57 lines
1.2 KiB
C++

/*
* IOException.h
*
* Created on: Oct 1, 2012
* Author: Mitchell Wills
*/
#ifndef IOEXCEPTION_H_
#define IOEXCEPTION_H_
#include <exception>
/**
* Inidcates that an unrecoverable I/O failure occured.
*/
class IOException : public std::exception{
public:
/**
* Creates a new IOException with the given message.
*
* @param message The message to associate with this exception.
*/
IOException(const char* message);
/**
* Creates a new IOException with the given message and
* error value.
*
* @param message The message to associate with this exception.
* @param errorValue The integer code to associate with this exception.
*/
IOException(const char* message, int errorValue);
/**
* Gets the message associated with this exception.
*
* @return The message associated with this exception.
*/
const char* what();
/**
* Determines whether this exception indicates that an EOF
* was encountered.
*
* @return True if this exception indicates that an EOF was encountered.
* False otherwise.
*/
virtual bool isEOF();
virtual ~IOException() throw ();
private:
const char* message;
int errorValue;
};
#endif /* IOEXCEPTION_H_ */