The tab completion handler in `completePrefix` only caught `ParseError`, `EvalError`, `BadURL`, and `FileNotFound`. Other error types like `JSONParseError` (which derives from `Error`, not `EvalError`) escaped the catch block and propagated through editline's C code as undefined behavior, crashing the REPL. This happened when tab-completing expressions like `(builtins.fromJSON "invalid").` where evaluation throws a non-`EvalError` exception. This commit marks `completionCallback` and `listPossibleCallback` as `noexcept` with function-try-blocks that catch all exceptions at the C/C++ boundary, preventing any exception from reaching editline. Fixes #15133.
1.6 KiB
1.6 KiB