diff options
author | chriseth <c@ethdev.com> | 2017-03-04 01:44:28 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-03-06 21:27:18 +0800 |
commit | 960b5fa032b0b948bb44876615e3e8c53a043325 (patch) | |
tree | 36800d32f4756d9220bfd38b0024ce8007cb1425 /libsolidity/interface/Exceptions.cpp | |
parent | c89a5798092cc7802680a62bf267b0eb8bcd8b6d (diff) | |
download | dexon-solidity-960b5fa032b0b948bb44876615e3e8c53a043325.tar.gz dexon-solidity-960b5fa032b0b948bb44876615e3e8c53a043325.tar.zst dexon-solidity-960b5fa032b0b948bb44876615e3e8c53a043325.zip |
Error constructor.
Diffstat (limited to 'libsolidity/interface/Exceptions.cpp')
-rw-r--r-- | libsolidity/interface/Exceptions.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libsolidity/interface/Exceptions.cpp b/libsolidity/interface/Exceptions.cpp index 41890b91..406ebbfb 100644 --- a/libsolidity/interface/Exceptions.cpp +++ b/libsolidity/interface/Exceptions.cpp @@ -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 |