refs #1164 ogRaiseError function call correction

code-review
Antonio Guerrero 2024-11-19 08:53:02 -06:00
parent b71e631fb1
commit d061c6116a
1 changed files with 11 additions and 2 deletions

View File

@ -12,6 +12,7 @@ from contextlib import redirect_stdout, redirect_stderr
import ogGlobals
import StringLib
import SystemLib
#NODEBUGFUNCTIONS, OGIMG, OG_ERR_CACHESIZE, OG_ERR_NOTCACHE, OG_ERR_NOTWRITE, OG_ERR_FILESYS
#OG_ERR_REPO, OG_ERR_NOTOS, OG_ERR_NOGPT, OG_ERR_OUTOFLIMIT, OG_ERR_IMAGE, OG_ERR_CACHE
@ -285,7 +286,11 @@ def ogCheckProgram(*args):
# Error si no se recibe 1 parámetro.
if len(args) != 1:
ogRaiseError(OG_ERR_FORMAT)
SystemLib.ogRaiseError(
"session",
ogGlobals.OG_ERR_FORMAT,
f"Error: {ogGlobals.lang.MSG_ERR_FORMAT} {FUNCNAME} \"str_program ...\""
)
return
PERROR = 0
@ -296,7 +301,11 @@ def ogCheckProgram(*args):
PLOG += f" {i}"
if PERROR == 1:
ogRaiseError(OG_ERR_NOTEXEC, PLOG)
SystemLib.ogRaiseError(
"session",
ogGlobals.OG_ERR_NOTEXEC,
f"Error: {PLOG}",
)
return
else:
return 0