#ifndef __EXCEPTIONS_H
#define __EXCEPTIONS_H
#include <stdexcept>
#include "miniz/miniz.h"
namespace Exceptions
{
Exception thrown on error in command line parameters
*/
class CmdLineError : public std::runtime_error
{
public:
CmdLineError (const std::string& msg): std::runtime_error(msg){}
};
Exception thrown on error in test run
*/
class TestError : public std::runtime_error
{
public:
TestError (const std::string& msg, int errorCode = 1): std::runtime_error(msg), m_errorCode(errorCode){}
int getErrorCode() const { return m_errorCode; }
private:
int m_errorCode;
};
class ArchiveError : public std::runtime_error
{
public:
ArchiveError(int errCode): std::runtime_error(mz_error(errCode)){}
};
}
#endif