From ce6f3b1273daafe4ccc8c672501cedb1a155986b Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Sun, 28 May 2023 20:39:21 -0500 Subject: [PATCH] Improve error list --- src/lib/components/ComfyGraphErrorList.svelte | 159 +++++++++--------- 1 file changed, 83 insertions(+), 76 deletions(-) diff --git a/src/lib/components/ComfyGraphErrorList.svelte b/src/lib/components/ComfyGraphErrorList.svelte index ad68d26..7680169 100644 --- a/src/lib/components/ComfyGraphErrorList.svelte +++ b/src/lib/components/ComfyGraphErrorList.svelte @@ -68,88 +68,91 @@
- {#each Object.entries(errors.errorsByID) as [nodeID, nodeErrors]} - {@const first = nodeErrors[0]} - {@const parent = getParentNode(first)} -
-
- {first.comfyNodeType} - {#if parent} - ({parent.title}) - {/if} -
-
- {#each nodeErrors as error} - {@const isExecutionError = error.errorType === "execution"} -
-
-
- -
- {error.message} - {#if error.exceptionType} - ({error.exceptionType}) - {/if} - {#if error.exceptionMessage && !isExecutionError} -
{error.exceptionMessage}
- {/if} - {#if error.input} -
- Input: {error.input.name} - {#if error.input.config} - ({getInputTypeName(error.input.config[0])}) +
+ {#each Object.entries(errors.errorsByID) as [nodeID, nodeErrors], i} + {@const first = nodeErrors[0]} + {@const parent = getParentNode(first)} + {@const last = i === Object.keys(errors.errorsByID).length - 1} +
+
+ {first.comfyNodeType} + {#if parent} + ({parent.title}) + {/if} +
+
+ {#each nodeErrors as error} + {@const isExecutionError = error.errorType === "execution"} +
+
+
+ +
+ {error.message} + {#if error.exceptionType} + ({error.exceptionType}) + {/if} + {#if error.exceptionMessage && !isExecutionError} +
{error.exceptionMessage}
+ {/if} + {#if error.input} +
+ Input: {error.input.name} + {#if error.input.config} + ({getInputTypeName(error.input.config[0])}) + {/if} +
+ {#if canJumpToDisconnectedInput(error)} +
+ + Find disconnected input +
{/if} -
- {#if canJumpToDisconnectedInput(error)} -
- - Find disconnected input -
- {/if} - {#if error.input.receivedValue} -
- Received value: {error.input.receivedValue} -
- {/if} - {#if error.input.receivedType} -
- Received type: {error.input.receivedType} -
- {/if} - {#if error.input.config} -
- -
-
- + {#if error.input.receivedValue} +
+ Received value: {error.input.receivedValue} +
+ {/if} + {#if error.input.receivedType} +
+ Received type: {error.input.receivedType} +
+ {/if} + {#if error.input.config} +
+ +
+
+ +
-
- -
+ +
+ {/if} {/if} - {/if} +
-
- {#if error.traceback} -
- -
-
- {#each error.traceback as line} -
{line}
- {/each} + {#if error.traceback} +
+ +
+
+ {#each error.traceback as line} +
{line}
+ {/each} +
-
- -
- {/if} -
- {/each} +
+
+ {/if} +
+ {/each} +
-
- {/each} + {/each} +