Refactor exceptions and provide comment function.

This commit is contained in:
chriseth committed 2017-07-13 11:34:03 +02:00
1 parent 757c500bda
commit 09e821619e
9 files changed
+83 -44

No files matched your search

-13
View File
@@ -67,16 +67,3 @@ Error::Error(Error::Type _type, const std::string& _description, const SourceLoc
*this << errinfo_sourceLocation(_location);
*this << errinfo_comment(_description);
}
string Exception::lineInfo() const
{
char const* const* file = boost::get_error_info<boost::throw_file>(*this);
int const* line = boost::get_error_info<boost::throw_line>(*this);
string ret;
if (file)
ret += *file;
ret += ':';
if (line)
ret += boost::lexical_cast<string>(*line);
return ret;
}