Files
darthrubik f13007602b Issue 49: Editor Module - Use std::expected return type
Update run_editor() to return std::expected<std::string, std::string>
for all editor-related failures instead of throwing exceptions.

Changes:
- include/editor.hpp: Change return type to std::expected
- src/editor.cpp: Replace all throw std::runtime_error() with
  return std::unexpected() for error cases:
  * Temp file open failure
  * No nvim/ set
  * Editor exit error
  * Scissors separator not found
  * Empty prompt after separator
- src/main.cpp: Use expect_or_exit() instead of try/catch
2026-05-27 17:14:36 -05:00

7 lines
169 B
C++

#pragma once
#include "json_types.hpp"
#include <string>
#include <expected>
std::expected<std::string, std::string> run_editor(HarnessState state, bool full_history);