| 23 | using namespace solidity::langutil; |
| 24 | |
| 25 | char const* Exception::what() const noexcept |
| 26 | { |
| 27 | // Return the comment if available. |
| 28 | if (std::string const* cmt = comment()) |
| 29 | return cmt->data(); |
| 30 | |
| 31 | // Fallback to base what(). |
| 32 | // Boost accepts nullptr, but the C++ standard doesn't |
| 33 | // and crashes on some platforms. |
| 34 | return std::exception::what(); |
| 35 | } |
| 36 | |
| 37 | std::string Exception::lineInfo() const |
| 38 | { |