From 24ed7c7d76fb81245001fa8e305ba7b6c35baa3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20St=C3=A4ding?= Date: Mon, 27 May 2024 10:00:31 +0200 Subject: [PATCH] Fix exception handling in process mode --- .../org/sourcegrade/jagr/launcher/executor/ProcessWorker.kt | 6 +++--- .../jagr/launcher/executor/RubricCollectorImpl.kt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/launcher/src/main/kotlin/org/sourcegrade/jagr/launcher/executor/ProcessWorker.kt b/launcher/src/main/kotlin/org/sourcegrade/jagr/launcher/executor/ProcessWorker.kt index 0f560fb3..4dff9071 100644 --- a/launcher/src/main/kotlin/org/sourcegrade/jagr/launcher/executor/ProcessWorker.kt +++ b/launcher/src/main/kotlin/org/sourcegrade/jagr/launcher/executor/ProcessWorker.kt @@ -1,7 +1,7 @@ /* * Jagr - SourceGrade.org - * Copyright (C) 2021-2022 Alexander Staeding - * Copyright (C) 2021-2022 Contributors + * Copyright (C) 2021-2024 Alexander Städing + * Copyright (C) 2021-2024 Contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -67,7 +67,7 @@ class ProcessWorker( sendRequest(job.request) job.gradeCatching(jagr, ::receiveResult) } catch (e: Exception) { - jagr.logger.error("Failed to send request to child process", e) + jagr.logger.error("Failed to send request to child process") job.result.completeExceptionally(e) } finally { status = WorkerStatus.FINISHED diff --git a/launcher/src/main/kotlin/org/sourcegrade/jagr/launcher/executor/RubricCollectorImpl.kt b/launcher/src/main/kotlin/org/sourcegrade/jagr/launcher/executor/RubricCollectorImpl.kt index f580de2d..674b8c6a 100644 --- a/launcher/src/main/kotlin/org/sourcegrade/jagr/launcher/executor/RubricCollectorImpl.kt +++ b/launcher/src/main/kotlin/org/sourcegrade/jagr/launcher/executor/RubricCollectorImpl.kt @@ -1,7 +1,7 @@ /* * Jagr - SourceGrade.org - * Copyright (C) 2021-2022 Alexander Staeding - * Copyright (C) 2021-2022 Contributors + * Copyright (C) 2021-2023 Alexander Städing + * Copyright (C) 2021-2023 Contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -99,7 +99,7 @@ internal class RubricCollectorImpl(private val jagr: Jagr) : MutableRubricCollec } listener(result) } catch (e: Exception) { - jagr.logger.error("An error occurred receiving result for grading job", e) + jagr.logger.error("An error occurred in grading job", e) } } return job