feat: 🎸 add active Error Exception Node
This commit is contained in:
@@ -321,4 +321,41 @@ class BatchIteratorStringCallbackNode:
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(s, emitter_result, key_id, reset=False, unique_id=0):
|
||||
return float('nan')
|
||||
|
||||
class BatchIteratorErrorException:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"singal": ("BOOLEAN", { "defaultInput": True, "default": False }),
|
||||
"silent_mode": ("BOOLEAN", { "default": False, }),
|
||||
},
|
||||
"hidden": {
|
||||
"unique_id": "UNIQUE_ID"
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("BOOLEAN", )
|
||||
RETURN_NAMES = ("void", )
|
||||
|
||||
CATEGORY = f'{MAIN_CATEGORY}/SystemTools'
|
||||
FUNCTION = "on_error"
|
||||
|
||||
def on_error(self, singal=False, silent_mode=False, unique_id=0):
|
||||
|
||||
if singal == True:
|
||||
print("[AsyncOutput]: BatchIteratorErrorException")
|
||||
if silent_mode == True:
|
||||
return (comfy_execution.graph.ExecutionBlocker(None), )
|
||||
else:
|
||||
raise Exception("ERROR: [AsyncOutput]->BatchIterator | Active Error Exception.")
|
||||
|
||||
return (singal, )
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(self, singal=False, silent_mode=False, unique_id=0):
|
||||
return float('nan')
|
||||
@@ -26,6 +26,7 @@ NODE_CLASS_MAPPINGS = {
|
||||
"BatchIteratorStringCollection": BatchIterator.BatchIteratorStringCollectionNode,
|
||||
"BatchIteratorStringEmitter": BatchIterator.BatchIteratorStringEmitterNode,
|
||||
"BatchIteratorStringCallback": BatchIterator.BatchIteratorStringCallbackNode,
|
||||
"BatchIteratorErrorException": BatchIterator.BatchIteratorErrorException,
|
||||
|
||||
"UtilsConvertStringListToStringNode": Utils.AsyncOutputUtilsConvertStringListToStringNode,
|
||||
}
|
||||
@@ -47,6 +48,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"BatchIteratorStringCollection": "BatchIterator String Collection",
|
||||
"BatchIteratorStringEmitter": "BatchIterator String Emitter",
|
||||
"BatchIteratorStringCallback": "BatchIterator String Callback",
|
||||
"BatchIteratorErrorException": "Active error triggering",
|
||||
|
||||
"UtilsConvertStringListToStringNode": "StringList To String",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user