Andriamanitra / coctus

Command line tool for playing clashes and I/O puzzles from CodinGame locally
MIT License
4 stars 2 forks source link

Make `clash show` return an error when it is followed by an invalid HANDLE #38

Closed daxida closed 7 months ago

daxida commented 7 months ago

If the handle is not alphanumeric PublicHandle::new error will be rescued at line 212 by:

let handle = self.handle_from_args(args).or_else(|_| self.current_handle())?;

The intended behaviour should be a crash (instead of showing the last clash loaded by next as it does now), with the message that is already present in PublicHandle: "Invalid clash handle '{}' (valid handles only contain characters 0-9 and a-f)".