diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-12-20 13:04:39 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2024-12-20 13:06:40 +0100 |
| commit | 19e4da9fd654886f1a49dfb3509daa6526401774 (patch) | |
| tree | d2dfa3cbd7b5e2a10effdb8d15aa5fbf5c4d29c0 /crates/nasm | |
| parent | 55d3c50c5dadbb4964781e3bf3c55b871eebd2b5 (diff) | |
| download | tools.nes-19e4da9fd654886f1a49dfb3509daa6526401774.tar.gz tools.nes-19e4da9fd654886f1a49dfb3509daa6526401774.zip | |
Improve the format of error messages
It was weird to show warnings which also showed "Error: " as a message,
and likewise it was weird for errors to display their kind, since users
simply do not care about this kind of information.
Hence, streamline the format to something closer to what it's done by
modern assemblers/compilers.
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'crates/nasm')
| -rw-r--r-- | crates/nasm/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/nasm/src/main.rs b/crates/nasm/src/main.rs index c071854..fc5d1c0 100644 --- a/crates/nasm/src/main.rs +++ b/crates/nasm/src/main.rs @@ -96,10 +96,10 @@ fn main() -> Result<()> { Ok(bundles) => { for warning in assembler.warnings() { if warn_as_errors { - eprintln!("{}", warning); + eprintln!("error: {}", warning); error_count += 1; } else { - eprintln!("Warning: {}", warning); + eprintln!("warning: {}", warning); } } if error_count == 0 { @@ -112,7 +112,7 @@ fn main() -> Result<()> { } Err(errors) => { for err in errors { - eprintln!("{}", err); + eprintln!("error: {}", err); error_count += 1; } } |
