CoreUtils/Exception.h
2023-10-05 17:57:01 -07:00

31 lines
586 B
C++

#ifndef __Exception_h__
#define __Exception_h__
#include <string.h>
#include <string>
#include <errno.h>
namespace coreutils {
///
/// Use an Exception oject whenever you want to throw an error for an exception condition
/// to your calling stack to inform the program of the condition.
///
class Exception {
public:
Exception(std::string text, std::string file = __FILE__, int line = __LINE__, int errorNumber = errno);
std::string className;
std::string file;
int line;
std::string text;
int errorNumber;
};
}
#endif