f13007602b
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
7 lines
169 B
C++
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);
|