ethereum / solidity

Solidity, the Smart Contract Programming Language
https://soliditylang.org
GNU General Public License v3.0
23.29k stars 5.76k forks source link

Templates for error reporting #8218

Closed erak closed 1 year ago

erak commented 4 years ago

Abstract

Support a more readable and consistent error reporting. Whiskers came up as a reference.

Motivation

Came out of https://github.com/ethereum/solidity/pull/8103.

Specification

E.g. "Cannot use <to_string(operator)> on <type.string()>."

christianparpart commented 4 years ago

I really like the idea of streamlining error reports. But if Whiskers is the right way to do that, I am not too sure.

My initial motivation was to improve readability of error messages by using semantic colouring, something that would be a convenient argument for using fmtlib (part of C++20's std::format), so that passing custom types to the error formatter could be auto-colorized & pretty-printed without additional effort on the caller side.

cameel commented 3 years ago

This PR seems relevant in this context: #11273.

github-actions[bot] commented 1 year ago

This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.

github-actions[bot] commented 1 year ago

Hi everyone! This issue has been automatically closed due to inactivity. If you think this issue is still relevant in the latest Solidity version and you have something to contribute, feel free to reopen. However, unless the issue is a concrete proposal that can be implemented, we recommend starting a language discussion on the forum instead.