Error constructor.

This commit is contained in:
chriseth committed 2017-03-06 14:27:18 +01:00
1 parent c89a579809
commit 960b5fa032
2 files changed
+12 -2

No files matched your search

+7 -1
View File
@@ -27,7 +27,8 @@ using namespace std;
using namespace dev;
using namespace dev::solidity;
Error::Error(Type _type): m_type(_type)
Error::Error(Type _type, SourceLocation const& _location, string const& _description):
m_type(_type)
{
switch(m_type)
{
@@ -56,6 +57,11 @@ Error::Error(Type _type): m_type(_type)
solAssert(false, "");
break;
}
if (!_location.isEmpty())
*this << errinfo_sourceLocation(_location);
if (!_description.empty())
*this << errinfo_comment(_description);
}
string Exception::lineInfo() const