29 lines
440 B
C++
29 lines
440 B
C++
#ifndef EXCEPTION_HANDLER_HPP
|
|
#define EXCEPTION_HANDLER_HPP
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
|
|
enum ErrorCode
|
|
{
|
|
UNKNOWN_ERROR,
|
|
CUSTOM_ERROR,
|
|
INVALID_PATH_ERROR,
|
|
INVALID_ARGUMENT_ERROR,
|
|
NO_ARGUMENT_ERROR,
|
|
PROCESS_ERROR
|
|
};
|
|
|
|
class ExceptionHandler
|
|
{
|
|
public:
|
|
ExceptionHandler(const ErrorCode, const std::string&);
|
|
ExceptionHandler(const ErrorCode);
|
|
void GrabError();
|
|
private:
|
|
ErrorCode _e;
|
|
std::string _s;
|
|
};
|
|
|
|
#endif
|