rpn(1): make error messages consistent with other tools
This commit is contained in:
		
							parent
							
								
									cf1d16f860
								
							
						
					
					
						commit
						3e6dc5cc46
					
				@ -52,8 +52,10 @@ use std::{
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
use CalcType::*;
 | 
					use CalcType::*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					extern crate strerror;
 | 
				
			||||||
extern crate sysexits;
 | 
					extern crate sysexits;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					use strerror::c_error;
 | 
				
			||||||
use sysexits::EX_DATAERR;
 | 
					use sysexits::EX_DATAERR;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, PartialEq, PartialOrd, Debug)]
 | 
					#[derive(Clone, PartialEq, PartialOrd, Debug)]
 | 
				
			||||||
@ -172,7 +174,7 @@ fn eval(
 | 
				
			|||||||
					};
 | 
										};
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					return Err(EvaluationError {
 | 
										return Err(EvaluationError {
 | 
				
			||||||
						message: format!("{}: Unexpected operation.", op),
 | 
											message: format!("{}: Unexpected operation", op),
 | 
				
			||||||
						code: EX_DATAERR,
 | 
											code: EX_DATAERR,
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user