From 72ebff1dcb2c14b3aecc7de14a2b9aa21ef9cc4a Mon Sep 17 00:00:00 2001 From: Chad Retz Date: Thu, 1 Feb 2024 13:56:58 -0600 Subject: [PATCH] Prefix some errors with rule identifiers (#1975) --- .../io/temporal/internal/sync/PotentialDeadlockException.java | 2 +- .../java/io/temporal/worker/NonDeterministicException.java | 4 ++-- .../internal/statemachines/VersionStateMachineTest.java | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/temporal-sdk/src/main/java/io/temporal/internal/sync/PotentialDeadlockException.java b/temporal-sdk/src/main/java/io/temporal/internal/sync/PotentialDeadlockException.java index 7fd50ce2c..086d15956 100644 --- a/temporal-sdk/src/main/java/io/temporal/internal/sync/PotentialDeadlockException.java +++ b/temporal-sdk/src/main/java/io/temporal/internal/sync/PotentialDeadlockException.java @@ -50,7 +50,7 @@ public class PotentialDeadlockException extends RuntimeException { PotentialDeadlockException( String threadName, WorkflowThreadContext workflowThreadContext, long detectionTimestamp) { super( - "Potential deadlock detected. Workflow thread \"" + "[TMPRL1101] Potential deadlock detected. Workflow thread \"" + threadName + "\" didn't yield control for over a second."); this.workflowThreadContext = workflowThreadContext; diff --git a/temporal-sdk/src/main/java/io/temporal/worker/NonDeterministicException.java b/temporal-sdk/src/main/java/io/temporal/worker/NonDeterministicException.java index 48ab4c354..52759001a 100644 --- a/temporal-sdk/src/main/java/io/temporal/worker/NonDeterministicException.java +++ b/temporal-sdk/src/main/java/io/temporal/worker/NonDeterministicException.java @@ -32,10 +32,10 @@ */ public class NonDeterministicException extends IllegalStateException { public NonDeterministicException(String message, Throwable cause) { - super(message, cause); + super("[TMPRL1100] " + message, cause); } public NonDeterministicException(String message) { - super(message); + super("[TMPRL1100] " + message); } } diff --git a/temporal-sdk/src/test/java/io/temporal/internal/statemachines/VersionStateMachineTest.java b/temporal-sdk/src/test/java/io/temporal/internal/statemachines/VersionStateMachineTest.java index 6b6a92a7a..d18d3d1cc 100644 --- a/temporal-sdk/src/test/java/io/temporal/internal/statemachines/VersionStateMachineTest.java +++ b/temporal-sdk/src/test/java/io/temporal/internal/statemachines/VersionStateMachineTest.java @@ -1315,7 +1315,8 @@ protected void buildWorkflow(AsyncWorkflowBuilder builder) { e.getCause() .getCause() .getMessage() - .startsWith("getVersion call before the existing version marker event.")); + .startsWith( + "[TMPRL1100] getVersion call before the existing version marker event.")); } } }