Files
UnrealEngine/Engine/Source/ThirdParty/FakeIt/2.0.2/include/fakeit/FakeitExceptions.hpp
2025-05-18 13:04:45 +08:00

42 lines
815 B
C++

/*
* Copyright (c) 2014 Eran Pe'er.
*
* This program is made available under the terms of the MIT License.
*
* Created on Mar 10, 2014
*/
#pragma once
#include "fakeit/FakeitEvents.hpp"
namespace fakeit {
struct FakeitException {
virtual ~FakeitException() = default;
virtual std::string what() const = 0;
friend std::ostream &operator<<(std::ostream &os, const FakeitException &val) {
os << val.what();
return os;
}
};
struct UnexpectedMethodCallException : public FakeitException {
UnexpectedMethodCallException(std::string format) :
_format(format) {
}
virtual std::string what() const override {
return _format;
}
private:
std::string _format;
};
}