Skip to content

Commit

Permalink
write errors to stderr instead of stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
thepigeongenerator committed Dec 9, 2024
1 parent b70df17 commit 32aee0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const DEFINITION_VALUE: usize = 4;
// error macro, which formats the printed text and exits with -1
macro_rules! error {
($($arg:tt)*) => {
print!("\x1b[91m");
print!($($arg)*);
print!("\x1b[0m\n");
eprint!("\x1b[91m");
eprint!($($arg)*);
eprint!("\x1b[0m\n");
exit(-1);
};
}
Expand Down

0 comments on commit 32aee0c

Please sign in to comment.