class WrongTypeException : public std::runtime_error
{
public:
- WrongTypeException(std::string luaType_, const std::type_info& destination_) :
+ WrongTypeException(const std::string& luaType_, const std::type_info& destination_) :
std::runtime_error("Trying to cast a lua variable from \"" + luaType_ + "\" to \"" + destination_.name() + "\""),
luaType(luaType_),
destination(destination_)
{
public:
PDNSException() : reason("Unspecified") {};
- PDNSException(string r) : reason(r) {};
+ PDNSException(const string& r) : reason(r) {};
string reason; //! Print this to tell the user what went wrong
};
{
public:
TimeoutException() : PDNSException() {}
- TimeoutException(string r) : PDNSException(r) {}
+ TimeoutException(const string& r) : PDNSException(r) {}
};