From d2854834e18443876c8f75e0a7f3b88d1d549fc4 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:15:39 +0200 Subject: 4.2 --- zen/file_error.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'zen/file_error.h') diff --git a/zen/file_error.h b/zen/file_error.h index 8c49937c..2992fbbe 100644 --- a/zen/file_error.h +++ b/zen/file_error.h @@ -17,10 +17,10 @@ namespace zen class FileError //Exception base class used to notify file/directory copy/delete errors { public: - FileError(const std::wstring& message) : errorMessage(message) {} + explicit FileError(const std::wstring& message) : errorMessage(message) {} virtual ~FileError() {} - const std::wstring& msg() const { return errorMessage; } + const std::wstring& toString() const { return errorMessage; } private: std::wstring errorMessage; @@ -38,11 +38,9 @@ DEFINE_NEW_FILE_ERROR(ErrorFileLocked); //----------- facilitate usage of std::wstring for error messages -------------------- //allow implicit UTF8 conversion: since std::wstring models a GUI string, convenience is more important than performance -inline std::wstring operator+(const std::wstring& lhs, const Zstring& rhs) { return std::wstring(lhs) += zen::utf8CvrtTo(rhs); } +inline std::wstring operator+(const std::wstring& lhs, const Zstring& rhs) { return std::wstring(lhs) += zen::utf8CvrtTo(rhs); } //we musn't put our overloads in namespace std, but namespace zen (+ using directive) is sufficient -inline std::wstring operator+(const std::wstring& lhs, const char* rhs) { return std::wstring(lhs) += utf8CvrtTo(rhs); } -inline std::wstring operator+(const std::wstring& lhs, const std::string& rhs) { return std::wstring(lhs) += utf8CvrtTo(rhs); } } #endif // FILEERROR_H_INCLUDED -- cgit