_e: print instead of throwing error

This commit is contained in:
Dr-Carlos 2022-04-18 06:53:03 +09:30
parent 9b334d0ee0
commit 789fc3325c
1 changed files with 4 additions and 4 deletions

View File

@ -5,6 +5,7 @@
#include <fmt/core.h>
#include <optional>
#include <fxos/util/log.h>
//---
// e
@ -26,17 +27,16 @@ static _e_args parse_e(Session &session, Parser &parser)
parser.accept_options();
VirtualSpace *space;
if (!args.space_name.empty())
if(!args.space_name.empty())
space = session.get_space(args.space_name);
else
space = session.current_space;
if (space)
if(space)
while(!parser.at_end())
args.values.push_back(parser.expr(space));
else
throw CommandError("virtual space {} does not exist",
args.space_name);
FxOS_log(ERR, "virtual space '%s' does not exist", args.space_name);
// TODO: Error message when session specified in _e does not exist