aboutsummaryrefslogtreecommitdiff
path: root/crates/nasm/src/main.rs
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-12-20 13:04:39 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-12-20 13:06:40 +0100
commit19e4da9fd654886f1a49dfb3509daa6526401774 (patch)
treed2dfa3cbd7b5e2a10effdb8d15aa5fbf5c4d29c0 /crates/nasm/src/main.rs
parent55d3c50c5dadbb4964781e3bf3c55b871eebd2b5 (diff)
downloadtools.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/src/main.rs')
-rw-r--r--crates/nasm/src/main.rs6
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;
}
}