Refactor error reporting to reduce duplication.

This commit is contained in:
Victor Zverovich
2014-08-29 08:16:10 -07:00
parent 605d2600f8
commit 5debb2aa86
2 changed files with 14 additions and 13 deletions
+2 -2
View File
@@ -215,8 +215,8 @@ typedef BasicStringRef<wchar_t> WStringRef;
*/
class FormatError : public std::runtime_error {
public:
explicit FormatError(const std::string &message)
: std::runtime_error(message) {}
explicit FormatError(StringRef message)
: std::runtime_error(message.c_str()) {}
};
namespace internal {