diff --git a/src/bin/ngri.rs b/src/bin/ngri.rs index 433972a..0558de4 100644 --- a/src/bin/ngri.rs +++ b/src/bin/ngri.rs @@ -16,18 +16,30 @@ fn main() -> Result<(), BackendError> { ":quit" => break, _ => state.process_input(line_no, command), }, + + // it's not clear to me what this could be, but OK Err(ReadlineError::Io(e)) => { eprintln!("IO error: {}", e); break; } + + // Control-D and Control-C Err(ReadlineError::Eof) => break, Err(ReadlineError::Interrupted) => break, + + // For some reason this doesn't exist on Windows. I also don't quite know + // what would cause this, but ... #[cfg(not(windows))] Err(ReadlineError::Errno(e)) => { eprintln!("Unknown syscall error: {}", e); break; } + + // We don't actually do any reflow-ing if we change the terminal size, + // so we can just ignore this. Err(ReadlineError::WindowResized) => continue, + + // Why on earth are there so many error types? Err(e) => { eprintln!("Unknown internal error: {}", e); break;