_e: print instead of throwing error
This commit is contained in:
parent
9b334d0ee0
commit
789fc3325c
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue