From 19e4da9fd654886f1a49dfb3509daa6526401774 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 20 Dec 2024 13:04:39 +0100 Subject: Improve the format of error messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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à --- crates/nasm/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/nasm/src/main.rs') 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; } } -- cgit v1.2.3