From 3b7bfe173764f157ff79904b8d6348aff8019dfb Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Mon, 30 Dec 2024 10:07:00 -0500 Subject: [PATCH] If an error is encountered, print the log message with `@error` (instead of `println`) --- src/slurmmanager.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slurmmanager.jl b/src/slurmmanager.jl index a01ad4f..2475adc 100644 --- a/src/slurmmanager.jl +++ b/src/slurmmanager.jl @@ -93,9 +93,9 @@ function launch(manager::SlurmManager, params::Dict, instances_arr::Array, c::Co sleep(manager.srun_post_exit_sleep) end - catch e - println("Error launching Slurm job:") - rethrow(e) + catch ex + @error "Error launching Slurm job" exception=ex + rethrow(ex) end end