1
0
forked from bonsai/harakit

rpn(1): make error messages consistent with other tools

This commit is contained in:
Emma Tebibyte 2024-03-01 23:14:18 -07:00
parent cf1d16f860
commit 3e6dc5cc46
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270

View File

@ -52,8 +52,10 @@ use std::{
use CalcType::*;
extern crate strerror;
extern crate sysexits;
use strerror::c_error;
use sysexits::EX_DATAERR;
#[derive(Clone, PartialEq, PartialOrd, Debug)]
@ -172,7 +174,7 @@ fn eval(
};
} else {
return Err(EvaluationError {
message: format!("{}: Unexpected operation.", op),
message: format!("{}: Unexpected operation", op),
code: EX_DATAERR,
})
}