_isc: print instead of throwing error

This commit is contained in:
Dr-Carlos 2022-04-18 07:32:50 +09:30
parent 86300fc1c7
commit e037d5889c
1 changed files with 8 additions and 4 deletions

View File

@ -6,6 +6,7 @@
#include <algorithm>
#include <fmt/core.h>
#include <fxos/util/log.h>
//---
// ic
@ -175,14 +176,17 @@ void _isc(Session &session, std::string vspace_name, bool sort,
if(!vspace_name.empty())
space = session.get_space(vspace_name);
if(!space)
throw CommandError("virtual space '{}' does not exist", vspace_name);
if(!space) {
FxOS_log(ERR, "virtual space '%s' does not exist", vspace_name);
return;
}
OS *os = space->os_analysis();
if(!os) {
if(!vspace_name.empty())
throw CommandError("OS analysis on '{}' failed", vspace_name);
throw CommandError("OS analysis failed");
FxOS_log(ERR, "OS analysis on '%s' failed", vspace_name);
FxOS_log(ERR, "OS analysis failed");
return;
}
int total = os->syscall_count();