FileException.h
// FileException.h
//
// Author David Barrett-Lennard
// (C)opyright Cedanet Pty Ltd 2008
#pragma once
#ifndef Ceda_cxUtils_FileException_H
#define Ceda_cxUtils_FileException_H
#include "cxUtils.h"
#include "SystemException.h"
#include "xstring.h"
namespace ceda
{
struct cxUtils_API FileException : public SystemException
{
FileException() : SystemException(0) {}
FileException(ConstStringZ filename);
FileException(ConstStringZ function, int errorCode, ConstStringZ filename);
void Write(xostream& os) const;
// This might be bad practice - to embed an object whose copy constructor could
// throw an exception. This could cause std::terminate() at the throw point.
#pragma warning(suppress: 4251)
xstring m_function;
#pragma warning(suppress: 4251)
xstring m_filename;
};
} // namespace ceda
#endif // include guard