Update error handling

This commit is contained in:
Uwe Seimet 2023-11-15 19:04:36 +01:00
parent 132a93765b
commit 1cffda409d
3 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,7 @@
//
//---------------------------------------------------------------------------
#include "scsisexec_core.h"
#include "scsiexec_core.h"
using namespace std;

View File

@ -7,7 +7,7 @@
//
//---------------------------------------------------------------------------
#include "scsisexec_core.h"
#include "scsiexec_core.h"
#include "hal/sbc_version.h"
#include "hal/gpiobus_factory.h"
#include "controllers/controller_manager.h"
@ -122,6 +122,10 @@ void ScsiExec::ParseArguments(span<char*> args)
throw parser_exception("Missing filename");
}
if (target_id == -1) {
throw parser_exception("Missing target ID");
}
if (target_lun == -1) {
target_lun = 0;
}