From c62fed8c61dc9261506c39eeac978933b1b4189e Mon Sep 17 00:00:00 2001 From: Enkidu93 Date: Thu, 12 Dec 2024 09:45:09 -0500 Subject: [PATCH] Use OperationCanceledException --- .../src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs b/src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs index 2d2e06f7..f85d35c1 100644 --- a/src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs +++ b/src/Machine/src/Serval.Machine.Shared/Services/PreprocessBuildJob.cs @@ -63,7 +63,7 @@ CancellationToken cancellationToken if (trainCount == 0 && (!sourceTagInBaseModel || !targetTagInBaseModel)) { - throw new InvalidOperationException( + throw new OperationCanceledException( $"At least one language code in build {buildId} is unknown to the base model, and the data specified for training was empty. Build canceled." ); }