mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-18 23:36:36 +01:00
error handling
This commit is contained in:
@@ -493,6 +493,8 @@ class DVM:
|
|||||||
if line != '\n':
|
if line != '\n':
|
||||||
result += line
|
result += line
|
||||||
os.remove(os.path.abspath('output.txt'))
|
os.remove(os.path.abspath('output.txt'))
|
||||||
|
if result.startswith("Error:"):
|
||||||
|
raise Exception
|
||||||
else: # Some components might have issues with running code in otuside venv.
|
else: # Some components might have issues with running code in otuside venv.
|
||||||
# We install locally in these cases for now
|
# We install locally in these cases for now
|
||||||
result = dvm.process(request_form)
|
result = dvm.process(request_form)
|
||||||
|
|||||||
@@ -145,5 +145,6 @@ def process_venv(identifier):
|
|||||||
result = dvm.process(json.loads(args.request))
|
result = dvm.process(json.loads(args.request))
|
||||||
DVMTaskInterface.write_output(result, args.output)
|
DVMTaskInterface.write_output(result, args.output)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
DVMTaskInterface.write_output(str(e), args.output)
|
DVMTaskInterface.write_output("Error: " + str(e), args.output)
|
||||||
|
raise Exception
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user